\documentclass[JEP,XML,SOM,Unicode, NoEqCountersInSection]{cedram}
\datereceived{2020-02-11}
\dateaccepted{2020-04-29}
\dateepreuves{2020-05-13}
%\begin{DefTralics}
%\newcommand{\sortnoop}[1]{}
%\end{DefTralics}
\providecommand{\noopsort}[1]{}
\multlinegap0pt
\usepackage{mathrsfs}
\let\mathcal\mathscr
\newenvironment{enumeratea}
{\bgroup\def\theenumi{\alph{enumi}}\begin{enumerate}}
{\end{enumerate}\egroup}
\newcommand\mto{\mathchoice{\longmapsto}{\mapsto}{\mapsto}{\mapsto}}
\newcommand\hto{\mathrel{\lhook\joinrel\to}}
\newcommand\To[1]{\mathchoice{\xrightarrow{\textstyle\kern4pt#1\kern3pt}}{\stackrel{#1}{\longrightarrow}}{}{}}
\newcommand{\sbullet}{{\scriptscriptstyle\bullet}}
\newcommand{\tprod}{{\textstyle\prod}}
\newcommand{\rc}{\mathrm{c}}
\usepackage[all,cmtip]{xy}\let\labelstyle\textstyle
\theoremstyle{plain}
\newtheorem{theo}{Theorem}[section]
\newtheorem*{theo*}{Theorem}
\newtheorem{prop}[theo]{Proposition}
\newtheorem{lem}[theo]{Lemma}
\newtheorem{cor}[theo]{Corollary}
\theoremstyle{definition}
\newtheorem{defi}[theo]{Definition}
\newtheorem{rema}[theo]{Remark}
\newtheorem{conj}[theo]{Conjecture}
\DeclareFontFamily{U}{wncy}{}
\DeclareFontShape{U}{wncy}{m}{n}{%
<5>wncyr5%
<6>wncyr6%
<7>wncyr7%
<8>wncyr8%
<9>wncyr9%
<10>wncyr10%
<11>wncyr10%
<12>wncyr6%
<14>wncyr7%
<17>wncyr8%
<20>wncyr10%
<25>wncyr10}{}
\DeclareMathAlphabet{\cyrille}{U}{wncy}{m}{n}
\DeclareMathOperator \br {Br}
\DeclareMathOperator \cok {coker}
\DeclareMathOperator\Cone{Cone}
\DeclareMathOperator \Imm {Im}\let\Im\Imm
\DeclareMathOperator \Ker {Ker}
\DeclareMathOperator \pic {Pic}
\DeclareMathOperator \gal {Gal}
\DeclareMathOperator \spec {Spec}
\renewcommand\AA{\mathbf{A}}
\newcommand \ZZ {\mathbf{Z}}
\newcommand \QQ {\mathbf{Q}}
\newcommand \FF {\mathbf{F}}
\newcommand \LL {\mathbf{L}}
\newcommand \NN {\mathbf{N}}
\newcommand \RR {\mathbf{R}}
\newcommand \Gm {\mathbf{G}_m}\let\G\Gm
\newcommand\cF {\mathcal{F}}
\newcommand\cN {\mathcal{N}}
\newcommand\cO {\mathcal{O}}
\newcommand \cT {\mathcal{T}}
\newcommand \cC {\mathcal{C}}
\newcommand\Sha{\cyrille X}
\let\ov\overline
\newcommand \kbar {{\bar k}}
\newcommand \et {\textup{ét}}
\newcommand \nr {\mathrm{nr}}
\newcommand \tors {\mathrm{tors}}
\begin{document}
\frontmatter
\title{Duality for complexes of tori over a~global~field of positive
characteristic}
\author[\initial{C.} \lastname{Demarche}]{\firstname{Cyril} \lastname{Demarche}}
\address{Université de Paris, Sorbonne Université, CNRS, Institut de Mathématiques de Jussieu-Paris Rive Gauche\\
75013 Paris, France\\
and Département de mathématiques et applications, École normale supérieure, CNRS, PSL Research University\\
45 rue d'Ulm, 75005 Paris, France}
\email{cyril.demarche@imj-prg.fr}
\urladdr{https://webusers.imj-prg.fr/~cyril.demarche/}
\author[\initial{D.} \lastname{Harari}]{\firstname{David} \lastname{Harari}}
\address{Université Paris-Saclay, C.N.R.S.,
Laboratoire de Mathématiques d'Orsay\\
91405 Orsay, France}
\email{david.harari@math.universite-paris-saclay.fr}
\urladdr{https://www.imo.universite-paris-saclay.fr/~harari/}
\begin{abstract}
If $K$ is a number field, arithmetic duality theorems for tori and complexes of tori over $K$ are crucial to understand local-global principles for linear algebraic groups over $K$. When $K$ is a global field of positive characteristic, we prove similar arithmetic duality theorems, including a Poitou-Tate exact sequence for Galois hypercohomology of complexes of tori. One of the main ingredients is the Artin-Mazur-Milne duality theorem for fppf cohomology of finite flat commutative group schemes.
\end{abstract}
\subjclass{11E72, 11G20, 14F20, 14H25}
\keywords{Artin-Mazur-Milne duality, complex of tori, flat cohomology, Poitou-Tate exact sequence}
\altkeywords{Dualité d'Artin-Mazur-Milne, complexe de tores, cohomologie plate, suite exacte de Poitou-Tate}
\alttitle{Dualité pour les complexes de tores sur un corps global de caractéristique strictement positive}
\begin{altabstract}
Sur un corps de nombres $K$, les théorèmes de dualité pour les tores et les complexes de tores sont cruciaux afin de comprendre le principe local-global pour les $K$-groupes algébriques linéaires. Nous démontrons de tels théorèmes de dualité arithmétique quand $K$ est un corps global de caractéristique $p$, et en particulier nous établissons une suite de Poitou-Tate pour l'hypercohomologie galoisienne d'un complexe de tores. Un des principaux ingrédients est la dualité d'Artin-Mazur-Milne pour la cohomologie fppf d'un schéma en groupes fini et plat.
\end{altabstract}
\maketitle
\tableofcontents
\mainmatter
\section{Introduction}\label{intro}
Let $K$ be a global field of characteristic $p \geq 0$ and let $\AA_K$ denote the ring of adèles of~$K$. Let $G$ be a reductive group over $K$, and $X$ be a torsor under $G$. We~are interested in rational points on $X$, and more precisely, on various local-global \hbox{principles} associated to $X$: does $X$ satisfy the Hasse principle, \ie does $X(\AA_K) \neq \emptyset$ imply $X(K) \neq \emptyset$? If not, can we explain the failure using the so-called Brauer-Manin obstruc\-tion to the Hasse principle? Assuming that $X(K) \neq \emptyset$, can we estimate the size of $X(K)$ by studying the so-called weak and strong approximation on $X$ (with a Brauer-Manin obstruction if necessary), \ie the closure of the set $X(K)$ in the topological space $X(\AA_K^S)$, where $S$ is a (not necessarily finite) set of places of $K$ and~$\AA_K^S$ is the ring of $S$-adèles (with no components in $S$)?
The answer to those questions is known in the case where $K$ is a number field, see for instance \cite[Cor.\,8.7 \& 8.13]{San} for the Hasse principle and weak approximation, and \cite[Th.\,3.14]{demlms} for strong approximation. Note that in the number field case, similar results are known for certain
non principal
homogeneous spaces of~$G$ (see~\cite{Bor} or \cite{BD}).
In the case of a global field of positive characteristic, the answer is known for semisimple simply connected groups (thanks to works by Harder, Kneser, Chernousov, Platonov, Prasad), but the general case is essentially open (see \cite[Th.\,1.9]{Ros} for some related results). One strategy to attack the remaining local-global questions is similar to one that worked for number fields: arithmetic duality theorems for tori, and abelianization of Galois cohomology (see for instance \cite{demphd} and \cite{demlms} for the case of strong approximation over number fields). Indeed, given a reductive group $G$ over a field $L$ (\eg $L$ is a global or a local field), one can construct a complex of tori of length two $C:= [T_1 \to T_2]$,\footnote{Throughout the paper, the piece of notation $:=$
means that the equality is a definition.}
together with ``abelianization maps'' $H^i(L,G) \to H^i(L,C)$ (cohomology sets here are Galois cohomology or hypercohomology sets), such that the cohomology sets of $G$ can be computed via the abelian cohomology groups of $C$ and the Galois cohomology of a semisimple simply connected group associated to $G$. The latter is well-understood when $L$ is a local or global field.
Motivated by the discussion above, this paper deals with arithmetic duality theorems for complexes of tori over global fields $K$
of positive characteristic;
in characteristic $0$, we also get refinements of previously known results.
The aforementioned applications to the arithmetic of reductive groups and homogeneous spaces will be given in a future paper.\enlargethispage{-\baselineskip}%
The main object is a two-term complex $C:= [T_1 \to T_2]$ of $K$-tori $T_1$ and $T_2$, and we are particularly interested in its Galois hypercohomology groups $H^i(K, C)$. The main result of the paper can be summarized as follows: we get Poitou-Tate exact sequences relating global Galois cohomology groups $H^i(K,C)$ and local ones $H^i(K_v,C)$ --- for any place $v$ of $K$ --- via the cohomology of the dual object $\widehat{C}$ of~$C$. To be more precise, let us introduce some notation: $K$ is the function field of a smooth, projective, and geometrically
integral curve $X$ over a finite field $k$. Let $X^{(1)}$ denote the set of closed points in $X$. If $A$ is a discrete
abelian group,
then $A^*$ is the Pontryagin dual of homomorphisms from $A$ to $\QQ / \ZZ$, and $A_\wedge$ denotes the completion $A_{\wedge}:=\varprojlim_{n \in \NN^*} A/n$.
\pagebreak[2]
We can now state one of the main results in the paper (see Theorem \ref{spt1bis}):
\begin{theo*}
Let $C:= [T_1 \to T_2]$ be a two-term complex of $K$-tori, and let \hbox{$\widehat{C}:= [\widehat{T_2} \to \widehat{T_1}]$} be the dual complex, where $\widehat{T}$ is the module of characters of a torus~$T$ ($T_1$ and $\widehat{T}_2$ are in degree $-1$). Then there is an exact sequence
\begin{equation}
\begin{array}{c}
\xymatrix@=5mm{
0 \ar[r]& H^{-1}(K,C)_{\wedge} \ar[r]& \bigl[\prod^{\prime}_{v \in X^{(1)}}
H^{-1}(K_v,C)\bigr]_{\wedge} \ar[r]&
H^2(K,\widehat C)^*\ar[d]\\
& H^1(K,\widehat C)^*\ar[d] &\ar[l]\bigl[\prod^{\prime}_{v \in X^{(1)}} H^{0}(K_v,C)\bigr]_{\wedge}&
\ar[l]H^0(K,C)_{\wedge}\\
& H^1(K,C) \ar[r]& \bigoplus_{v \in X^{(1)}} H^1(K_v,C) \ar[r]& H^0(K,\widehat C)^*\ar[d]\\
0 &\ar[l]H^{-1}(K,\widehat C)^*& \ar[l]\bigoplus_{v \in X^{(1)}} H^2(K_v,C)&\ar[l]H^2(K,C)
}
\end{array}
\end{equation}
\end{theo*}
In the case where $K$ is a number field, we also recover a generalization of \cite[Th.\,6.1 \& 6.3]{demphd}. In the function field case, some partial results related to this exact sequence for one single torus can be deduced from \cite[\S6]{gonz1}.
The main ingredient to prove the theorem above is the so-called Artin-Mazur-Milne duality theorem for the fppf cohomology of finite flat commutative group schemes over open subsets of $X$ (see \cite[Th.\,III.8.2]{MilADT} and \cite[Th.\,1.1]{DemH}).
It is worth noting that although the complexes that appear in the previous
theorem consist of smooth group schemes (hence the result can be stated
using only Galois cohomology), it is essential for the proof to involve
finite group schemes (which are not
smooth in general) over Zariski open subsets of $X$. That is why
\cite[Th.\,1.1]{DemH} is required instead of the Artin-Verdier
duality theorem (\cite[Cor.\,II.3.3]{MilADT}) in étale cohomology.
Likewise for Theorems~\ref{refin1} and \ref{refin2}.\enlargethispage{-\baselineskip}%
Also, since it is necessary at some point to work with the fppf topology,
the approach of duality theorems via Ext groups (like \cite[Th.\,II.3.1]{MilADT}) does not seem to work, the difficulty being the lack of good
notion of constructible sheaf for the fppf topology (see \cite[Introduction to Chap.\,III]{MilADT}).
The structure of the paper is the following: Section~\ref{one} extends the construction and properties given in \cite{DemH} of fppf cohomology with compact support to the case of bounded complexes of finite flat group schemes. General properties of étale cohomology of complexes of tori and of their dual complexes are given in Section~\ref{onebis}. Section~\ref{two} deals with applications of Artin-Mazur-Milne duality theorem to various duality statements for the étale cohomology of complexes of tori over open subsets~$U$ of~$X$. In Section~\ref{three}, one deduces several Poitou-Tate exact sequences for Galois cohomology from the results of Section~\ref{two}.
\subsubsection*{Acknowledgements}
We thank J.L. Colliot-Thélène and the anonymous referee
for helpful comments.
\section{Compact support hypercohomology} \label{one}
Let $K$ be the function field of a smooth, projective, and geometrically
integral curve $X$ over a finite field $k$. Let $U$ be a non empty
Zariski open subset of $X$. Denote by $U^{(1)}$ the set of closed points
of $U$.
Let $\cC=(C_p)_{p \in \ZZ}$
be a bounded complex of fppf sheaves over $U$. In this text, we define the dual of $\cC$ to be the Hom-complex $\widehat{\cC}$ defined by
\[
\widehat{\cC}:= \underline{\textup{Hom}}^\sbullet(\cC, \Gm[1]),
\]
following the sign conventions in \cite[Tag 0A8H]{SP} or in \cite[X.5.1]{bkiac}.
Note that there is a functorial morphism of complexes
\[
\textup{Tot}(\cC \otimes \widehat{\cC}) \to \Gm[1]
\]
mapping an element $c \otimes \varphi\!\in\!C_p \otimes \textup{Hom}(C_q, A_n)$ to $0$ if $p\!\neq\!q$, and to $(-1)^{p (n-1)} \varphi(c)\!\in\!A_n$ if $p=q$.
With those conventions, if $\cC$ is concentrated in degree $0$, \ie $\cC = \cF$ with $\cF$ an fppf sheaf, then $\widehat{\cC}$ is the same as the Cartier dual $\cF^D:= \underline{\textup{Hom}}(\cF, \Gm)$ attached in degree $-1$, \ie $\widehat{\cC} = \cF^D[1]$ and the above pairing coincides with the obvious pairing $\cF \otimes \cF^D[1] \to \Gm[1]$ with no extra sign.
Note also that for any bounded complex $\cC$, we have a natural isomorphism of complexes $\widehat{\cC[1]} \To{\sim} \widehat{\cC}[-1]$, given by a sign $(-1)^{n+1}$ in degree $n$. And given a morphism $f: A \to B$ of bounded complexes, we have a natural isomorphism of complexes $\widehat{\textup{Cone}(f)} \To{\sim} \textup{Cone}(\widehat{f})[-1]$ such that the following diagram commutes\vspace*{-3pt}
\begin{equation} \label{cone and dual}
\begin{array}{c}
\xymatrix@R=6mm{
\widehat{A[1]} \ar[r] \ar[d]^\wr & \widehat{\textup{Cone}(f)} \ar[r] \ar[d]^\wr & \widehat{B} \ar[r]^{\widehat{f}} \ar@{=}[d] & \widehat{A} \ar@{=}[d] \\
\widehat{A}[-1] \ar[r] & \textup{Cone}(\widehat{f})[-1] \ar[r] & \widehat{B} \ar[r]^{\widehat{f}} & \widehat{A}.
}
\end{array}
\end{equation}
If $\cN$ is a commutative
group scheme (over $U$ or over $K$), its Cartier dual is
denoted $\cN^D$. The Pontryagin dual of a topological abelian group
$A$ (consisting of continuous homomorphism from $A$ to $\QQ/\ZZ$) is
denoted $A^*$. Unless explicitly specified, the topology used for
sheaves (\resp complex of sheaves) and cohomology (\resp hypercohomology) is the fppf topology.
For each closed point $v$ of $X$, the completion of $K$ at $v$
is denoted by $K_v$: it is a local field of characteristic $p$ with
finite residue field $\FF_v$ (observe the slight difference of notation with
\cite{DemH}, where $K_v$ stands for the henselization and $\widehat{K_v}$
for the completion). Denote by $\cO_v$ the ring of integers of $K_v$.
For every fppf sheaf $\cF$
over $U$ with generic fiber $F$, recall (\cite[Prop.\,2.1]{DemH})
the long exact sequence (where the piece of notation $v \not \in U$ means
that we consider all closed points of $X\setminus U$).
\begin{equation} \label{suppcomp}
\cdots\to H^i_\rc(U,\cF) \to H^i(U,\cF) \to \bigoplus_{v \not
\in U} H^i(K_v,F) \to H^{i+1}_\rc(U,\cF) \to\cdots
\end{equation}
There is also a long exact sequence
\begin{equation} \label{longex1}
\cdots\to H^i_\rc(U,\cF') \to H^i_\rc(U,\cF) \to
H^i_\rc(U,\cF'') \to H^{i+1}_\rc(U,\cF ') \to\cdots
\end{equation}
associated to every short exact sequence
\[
0 \to \cF' \to \cF \to \cF'' \to 0
\]
of fppf sheaves.
Let us now extend the construction of the groups $H^i_\rc(U,\dots)$ and \cite[Prop.\,2.1]{DemH} to the case of bounded complexes.
Let $\cC:= [\cdots\to \cF_i \to \cF_{i+1} \to\cdots]$ be a bounded complex of fppf sheaves over $U$.
Let $\cC \to I^\sbullet(\cC)$ be an injective resolution of the complex $\cC$, in the sense of \cite[Tag 013K]{SP}.
Following \cite[\S2]{DemH}, let $Z:= X \setminus U$ and
$Z':= \coprod_{v \in Z} \spec({K_v}) \To{i} U$.
Denote by $\cC_v$ and $I^\sbullet(\cC)_v$ their respective
pullbacks to $\spec K_v$, for $v \notin U$.
We now define $\Gamma_\rc(U, I^\sbullet(\cC))$ to be the following object in the category of complexes of abelian groups:
\[
\Gamma_\rc(U, I^\sbullet(\cC)):= \Cone\left(\Gamma(U, I^\sbullet(\cC)) \to \Gamma(Z', i^* I^\sbullet(\cC)) \right)[-1],
\]
and $H^r_\rc(U, \cC):= H^r(\Gamma_\rc(U, I^\sbullet(\cC)))$. We will also denote by $R\Gamma_\rc(U,\cC)$ the complex $\Gamma_\rc(U, I^\sbullet(\cC))$.
Similarly, one can define, for any closed point $v \in X$, complexes $\Gamma_v(\cO_v, \cC)$ computing fppf cohomology groups $H^r_v(\cO_v, \cC)$ over $\spec \cO_v$ with support in the closed point, as in \cite[before Lem.\,2.6]{DemH}.
As in \cite{DemH}, similar definitions could be made when $K$ is a number field (taking into account the real places), but in this article we will focus on the function field case. However, we will make remarks regularly throughout the text explaining similarities and differences appearing in the number field case.
We will need the analogue of \cite[Prop.\,2.1 \& 2.12]{DemH} for bounded complexes $\cC$: by construction, the first two points of
loc.\,cit., Prop.\,2.1 (\ie exact sequence \eqref{suppcomp} and~\eqref{longex1}) still hold for bounded complexes.
\begin{prop} \label{prop 2.1.3 and 2.12}
Let $\cC$ be a bounded complex of flat affine commutative group schemes of finite type over $U$, and let $V \subset U$ be a non empty open subset.
\begin{enumerate}
\item There is a canonical commutative diagram of abelian groups:
{\smaller\[
\xymatrix@C=10pt@R=5mm{
& & \bigoplus\limits_{v \notin V}\hspace*{-1mm}H^{r-1}({K_v},\cC) \ar[d] & \bigoplus\limits_{v \notin U}\hspace*{-1mm}H^{r-1}({K_v}, \cC) \ar[l]_-{i_2} \ar[d] & &\\
\cdots \ar[r] & \hspace*{-1mm}\bigoplus\limits_{v \in U \setminus V}\hspace*{-3mm}H^{r-1}({\cO_v}, \cC)
\ar[r] \ar[ru]^-{i_1} & H^r_\rc(V, \cC) \ar[r] \ar[d] & H^r_\rc(U, \cC) \ar[r] \ar[d] & \hspace*{-1mm}\bigoplus\limits_{v \in U \setminus V}\hspace*{-3mm}H^{r}({\cO_v}, \cC) \ar[r] & \cdots \\
& & H^r(V,\cC) \ar[d]& H^r(U,\cC) \ar[d] \ar[l]_-{\textup{Res}} \ar[ru] & & \\
& & \bigoplus\limits_{v \notin V}\!\!H^r({K_v},\cC) \ar[r]^-{\pi} & \bigoplus\limits_{v \notin U}\!\!H^r({K_v}, \cC), & &
}
\]}
where the long row and the columns are exact.
\item Let $V \subset U$ be a non empty open subset. Then there is
an exact sequence
\[\cdots\to \bigoplus_{v \in U \setminus V}\hspace*{-3mm} H^r_v(\cO_v,\mathcal C) \to
H^r(U,\mathcal C) \to H^r(V,\mathcal C) \to \bigoplus_{v \in U \setminus V}\hspace*{-3mm}
H^{r+1}_v(\cO_v,\mathcal C) \to\cdots
\]
\end{enumerate}
\end{prop}
\begin{proof}
We follow the proofs of \cite[Prop.\,2.1 3 \& Prop.\,2.12]{DemH}. Easy dévissages imply that \cite[Lem.\,2.6]{DemH} holds with $\cF$ replaced by a bounded complex of flat commutative group schemes of finite type and \cite[Lem.\,2.9]{DemH} holds for bounded complexes of fppf sheaves. Likewise
\cite[Lem.\,2.10]{DemH} holds for bounded complexes of étale sheaves
or of smooth commutative group schemes.
Therefore, one can copy the proofs of \cite[Prop.\,2.1\,(3) \& Prop.\,2.12]{DemH} to get the required Proposition.
\end{proof}
\begin{lem} \label{uvlem}
Let $\cC$ be a bounded complex of flat commutative group schemes
of finite type over $U$ with generic fiber $C$ over $K$. Let $i$ be an integer.
For each $v \in U^{(1)}$, denote by $H^i_{\nr}(K_v,C)$ the image of
$H^i(\cO_v,\mathcal C)$ in $H^i(K_v,C)$.
Let $V \subset U$ be a non empty Zariski open subset.
Then there is an exact sequence
\[
H^i(U,\mathcal C) \to \tprod_{v \not \in U} H^i(K_v,C) \times
\tprod_{v \in U \setminus V} H^i_{\nr}(K_v,C) \to H^{i+1}_\rc(V,\mathcal C).
\]
\end{lem}
\begin{proof} There is a commutative diagram such that the second line and the
left column are exact (by \eqref{suppcomp} and Prop.\,\ref{prop 2.1.3 and 2.12} 2.):
\[
\begin{array}{c}
\xymatrix@=5mm{
H^i(U,\mathcal C) \ar[r]\ar[d]& \tprod_{v \not \in U} H^i(K_v,C) \times
\tprod_{v \in U \setminus V} H^i_{\nr}(K_v,C)\ar[d]^j\\
H^i(V,\mathcal C) \ar[r]\ar[d]& \tprod_{v \not \in U} H^i(K_v,C) \times
\tprod_{v \in U \setminus V} H^i(K_v,C) \ar[r]\ar[d]& H^{i+1}_\rc(V,\mathcal C)\\
\tprod_{v \in U\setminus V} H^{i+1}_v(\cO_v,\mathcal C)\ar@{=}[r]&
\tprod_{v \in U\setminus V} H^{i+1}_v(\cO_v,\mathcal C)
}
\end{array}
\]
For $v \in U\setminus V$, the localization exact sequence (\cf proof of
Proposition \ref{prop 2.1.3 and 2.12}, 2.)
\[
H^i(\cO_v,\mathcal C) \to H^i(K_v,C) \to H^{i+1}_v(\cO_v,\mathcal C)
\]
yields that
the second column is a complex. Since $j$ is injective by definition, the
required exact sequence follows by diagram chasing.
\end{proof}
For a complex $\cC$ of finite flat group schemes,
let us now endow the groups $H^*_\rc(U, \cC)$ with a natural topology, compatible with the one defined in \cite{DemH} in the case where~$\cC$ is a finite flat group scheme.
Let $F$ be a local field (that is: a field complete for a discrete valuation
with finite residue field) and let $\cC:= [C_r \To{f_r} C_{r+1} \to \cdots \to C_s]$ be a bounded complex of finite commutative group schemes over $\spec F$, with $C_i$ in degree $i$. We assume that $F$ is of positive
characteristic $p$ (if $F$ is $p$-adic, then all
groups $H^r(F,\mathcal C)$ are finite by \cite[Cor.\,I.2.3]{MilADT}).
\begin{defi}
A morphism $f: G_1 \to G_2$
of topological groups is \emph{strict} if it is continuous, and
the restriction $f: G_1 \to f(G_1)$ is
an open map (where the topology on~$f(G_1)$ is induced by $G_2$). This is
equivalent to saying that $f$ induces an isomorphism of the topological
quotient $G_1/\ker f$ with the topological subspace $f(G_1) \subset G_2$.
\end{defi}
Let $A:= \ker(f_r)$, and let $\overline{\cC}:= \textup{Cone}(A[-r] \To{j} \cC)$. Then there is an exact triangle%
\begin{equation} \label{devissage complexe}
A[-r] \To{j} \cC \To{i} \overline{\cC} \To{p} A[1-r].
\end{equation}
In addition, we have a natural quasi-isomorphism $\varphi: \overline{\cC} \to \cC'$, where $\cC':= [C_{r+1}/\Im (f_r) \to C_{r+2} \to \cdots\to C_s]$ has a smaller length than $\cC$.
There is an alternative dévissage for the complex $\cC$, given by
the exact triangle:
\begin{equation} \label{devissage complexe bis}
\widetilde{\cC} \To{i'} \cC \To{p} C_r[-r] \To{\partial} \widetilde{\cC}[1],
\end{equation}
where $\widetilde{\cC}:= [C_{r+1} \To{f_{r+1}} C_{r+2} \to \cdots\to C_s]$.
Recall that for a finite and commutative $F$-group scheme $N$, the fppf groups
$H^i(F,N)$ are finite if $i \neq 1$ (\cite[\S III.6]{MilADT}) and they are
equipped with a locally compact topology for $i=1$ by \cite{Ces}.
By induction on the length of $\cC$, one deduces that if $C_i = 0$, then $H^{i+1}(F, \cC)$ is finite. In particular, with the previous notation, we get that $H^i(F, \cC)$ is finite if $i \leq r$ or $i \geq s+2$.
We now define a natural topology on $H^i(F, \cC)$ by induction on the length of $\cC$, such that any morphism of such complexes induces a strict map between hypercohomology groups. Using the dévissages given by \eqref{devissage complexe} and \eqref{devissage complexe bis}, one gets the following exact sequences\vspace*{-3pt}
\begin{multline} \label{devissage cohomo}
H^{i-1}(F, \cC') \to H^{i-r}(F,A) \To{f} H^i(F, \cC) \To{g} H^i(F, \cC')\\ \to H^{i+1-r}(F,A) \to \cdots\vspace*{-3pt}
\end{multline}
and\vspace*{-3pt}
\begin{multline} \label{devissage cohomo bis}
H^{i-r-1}(F, C_r) \to H^{i}(F,\widetilde{\cC}) \To{f'} H^i(F, \cC) \To{g'} H^{i-r}(F, C_r)\\ \to H^{i+1}(F,\widetilde{\cC}) \to \cdots,\vspace*{-3pt}
\end{multline}
where all the groups except $H^i(F, \cC)$ are endowed with a
natural topology via the induction hypothesis (observe that $C'_r=0$).
\begin{itemize}
\item Assume that $i = r+1$. Equip $\Im f\cong H^{i-r}(F,A)/
\Im H^{i-1}(F, \cC')$ with the quotient topology.
Then the two rightmost groups in exact sequence \eqref{devissage cohomo} are finite, and we can endow $H^{r+1}(F, \cC)$ with the topology such that
$\Im f$ is an open subgroup (see \cite[beginning of \S 3]{DemH}).
In other words it is the
finest topology such that $f$ is continuous. Then $f$ and $g$ are strict.
\item Assume that $i \neq r+1$. Then $H^{i-r}(F,C_r)$ is finite (and discrete), and using exact sequence \eqref{devissage cohomo bis} one can similarly
endow $H^i(F, \cC)$ with the finest topology making $f'$ continuous. Then both maps $f'$ and $g'$ are strict.
\end{itemize}
By construction, this topology is functorial in $\cC$, \ie if $\cC_1 \to \cC_2$ is a morphism of complexes, then the induced map $H^i(F, \cC_1) \to H^i(F, \cC_2)$ is strict. In addition, given a quasi-isomorphism $\cC_1 \to \cC_2$, the induced morphism on cohomology groups is a homeomorphism.
Let us now deal with the topology on the groups $H^*_\rc(U, \cC)$, where $\cC$ is a complex of finite flat commutative group schemes defined over $U$. Recall that we have an exact sequence analogous to \eqref{suppcomp}:
\begin{equation} \label{long exact seq compact supp}
H^{i-1}(U,\cC) \to \bigoplus_{v \notin U} H^{i-1}(K_v,\cC) \to H^{i}_\rc(U,\cC) \to H^{i}(U,\cC).
\end{equation}
We endow the groups $H^{i}(U,\!\cC)$ with the discrete topology, and the groups~$H^{i-1}(K_v,\!\cC)$ with the topology defined above.
\begin{lem} \label{closedimagecomplex}
For all $i$, the map $H^i(U, \cC) \to \bigoplus_{v \notin U} H^{i}(K_v,\cC)$ has discrete image.
\end{lem}
\begin{proof}
We prove the result by induction on the length of $\cC$, using the dévissages induced by the exact triangles \eqref{devissage complexe} and \eqref{devissage complexe bis}.
\begin{itemize}
\item Assume that $i = r+1$. Using the exact triangle \eqref{devissage complexe bis}, we get the following commutative diagram of long exact sequences of topological groups (where all maps are strict):\vspace*{-5pt}
\[
\xymatrix@R=6mm{
H^{r+1}(U, \widetilde{\cC}) \ar[r] \ar[d] & H^{r+1}(U, \cC) \ar[r] \ar[d] & H^1(U, C_r) \ar[d] \\
\bigoplus_{v \notin U} H^{r+1}(K_v, \widetilde{\cC}) \ar[r] & \bigoplus_{v \notin U} H^{r+1}(K_v, \cC) \ar[r] & \bigoplus_{v \notin U} H^1(K_v, C_r).
}
\]
The groups on the left hand side are finite, and by \cite[Lem.\,2.7]{cesnalms}, the image of the right hand side map is discrete in $\bigoplus_{v \notin U} H^1(K_v, C_r)$. Since $\bigoplus_{v \notin U} H^{r+1}(K_v, \cC)$ is Hausdorff, an easy topological argument implies that the image of the central vertical map is discrete.
\item Assume that $i \neq r+1$. Using the exact triangle \eqref{devissage complexe}, we get the following commutative diagram of long exact sequences of topological groups:\vspace*{-3pt}
\[
\xymatrix@R=6mm{
H^{i-r}(U, A) \ar[r] \ar[d] & H^{i}(U, \cC) \ar[r] \ar[d] & H^i(U, \cC') \ar[d] \\
\bigoplus_{v \notin U} H^{i-r}(K_v, A) \ar[r] & \bigoplus_{v \notin U} H^{i}(K_v, \cC) \ar[r] & \bigoplus_{v \notin U} H^i(K_v, \cC').
}
\]
The groups on the left hand side are finite, and by induction on the length of the complex, the image of the right hand side map is discrete in $\bigoplus_{v \notin U} H^1(K_v, \cC')$. A~similar topological argument as before implies that the central vertical map is discrete.\qedhere
\end{itemize}
\end{proof}
As a consequence of this Lemma, one can endow $H^i_\rc(U, \cC)$ with the following topology: we put the quotient topology on the group $\bigoplus_{v \notin U} H^{i}(K_v,\cC) / \Im H^i(U, \cC)$ (this topology is Hausdorff),
and since $H^i(U, \cC)$ is discrete, there is a unique topology on $H^i_\rc(U, \cC)$ such that the maps in the exact sequence \eqref{long exact seq compact supp} are strict.
\begin{lem} \label{lem topo profinite}
The topological group $H^i_\rc(U, \cC)$ is profinite.
\end{lem}
\begin{proof}
We prove this Lemma by induction on the length of the complex $\cC$.
By \cite[Prop.\,3.5]{DemH}, the lemma is proved when $\cC$ is a complex of length one, \ie concentrated in one given degree.
\pagebreak[2]
Given a complex $\cC$, consider the previous dévissages:
\begin{itemize}
\item Assume that $i = r+1$. Then the exact sequence \eqref{devissage cohomo} implies that the group $H^{r+1}_\rc(U, \cC)$ is an extension (the maps
being strict) of a (discrete) finite group by a profinite group (which is a quotient of $H^1_\rc(U, A)$ by a closed subgroup), hence $H^{r+1}_\rc(U, \cC)$ is profinite.
\item Assume that $i \neq r+1$. Then the exact sequence \eqref{devissage cohomo bis} implies that $H^i_\rc(U, \cC)$ is an extension of a finite (discrete) group by a profinite group (which is a quotient of $H^i_\rc(U, \widetilde{\cC})$ by a closed subgroup), hence it is profinite.\qedhere
\end{itemize}
\end{proof}
\section{Cohomology of tori and short complexes of tori} \label{onebis}
Let $U$ be a non empty
Zariski open subset of $X$. Recall that for every \emph{$U$-torus}~$\cT$ (in~the sense of \cite[IX, Déf.\,1.3]{sga3}),
there is a finite étale covering
(that can be taken to be connected and
Galois) $V$ of $U$ such that $\cT_V:=\cT \times_U V$
is \emph{split}, that is: isomorphic to some power $\G ^r$ ($r \in \NN$) of the
multiplicative group \hbox{(\cite[X, Th.\,5.16]{sga3})}. The \emph{group of characters}
$\widehat \cT$ of $\cT$ is a $U$-group scheme locally isomorphic to
$\ZZ^r$ for the étale topology, namely it is a torsion-free and finite
type $\gal(V/U)$-module.
Given a complex of $U$-tori $\cC=[\cT_1 \To{\rho} \cT_2]$
with generic fiber $C=[T_1 \To{\rho}T_2]$ over $K$,
where by convention $\cT_1$ is in degree $-1$ and $\cT_2$ in degree $0$, we
can apply the construction of Section~\ref{one}.
Namely we have dual complexes $\widehat \cC
=[\widehat \cT_2 \to \widehat \cT_1]$ and
$\widehat C=[\widehat T_2 \To{\hat \rho}
\widehat T_1]$ (concentrated in degrees $-1$ and $0$), which are
respectively defined over $U$ and over $K$. Fix a separable closure
$\ov K$ of $K$.
Denote by $S$ the finite set $X\setminus U$ and by $G_S=\pi_1^{\et}(U)$ the étale fundamental
group of $U$, which is the
Galois group of the maximal
field extension $K_S \subset \ov K$ of $K$ unramified outside $S$; then
each $\widehat \cT_i$ ($i=1,2$) can be viewed as a discrete $G_S$-module.
Recall that fppf and étale
cohomology coincide for sheaves represented by smooth group schemes
(\cite[\S III.3]{MilEC}) like a torus $\cT$, its group
of characters $\widehat \cT$, or finite flat group schemes of order
prime to $p$. In particular (by \cite[Lem.\,III.1.16]{MilEC}) we have
for every integer $i$:
\[
\varinjlim_U H^i(U,\cC) \cong H^i(K,C)
\]
(where the limit is over all non empty Zariski open subsets $U$ of $X$),
and likewise for the complex $\widehat \cC$.
For such 2-term complexes, the pairings of Section~\ref{one}
can be made explicit (see \cite[\S2]{demphd}; note that the sign conventions are slightly different here), and give maps
\[
\cC \otimes^{\LL}
\widehat \cC \to \G[1]; \quad C \otimes^\LL \widehat C \to \G[1]
\]
in the bounded derived category ${\mathcal D}^b(U)$ (\resp ${\mathcal D}^b(\spec K)$)
of fppf sheaves over $U$ (\resp over $\spec K$).
In the case $T_1=0$ or $T_2=0$, we recover (up to shift) the
classical pairings $\cT \otimes \widehat \cT \to \G$ and $T \otimes
\widehat T \to \G$ associated to one single torus $\cT$.
We also have for each positive integer $n$ the $n$-adic realizations
\[
T_{\ZZ/n}(\cC):=H^0(\cC[-1] \otimes^\LL \ZZ/n); \quad
T_{\ZZ/n}(\widehat \cC):=H^0(\widehat \cC[-1] \otimes^\LL \ZZ/n)
\]
and likewise for $C$ and $\widehat C$.
The fppf sheaf $T_{\ZZ/n}(\cC)$ is representable by a finite group
scheme of multiplicative type over $U$ (in the sense of \cite[IX,
Déf.\,1.1]{sga3}) with Cartier dual
$T_{\ZZ/n}(\widehat \cC)$, and similarly for $T_{\ZZ/n}(C)$ and
$T_{\ZZ/n}(\widehat C)$ over $K$. Besides we have exact
triangles (\cite[Lem.\,2.3]{demphd}), where for every abelian group (or group
scheme) $A$, the piece of notation
$_ n A$ stands for the $n$-torsion subgroup of $A$:
\begin{equation} \label{exactriang1}
_n(\ker \rho)[2] \to \cC \otimes^\LL \ZZ/n \to
T_{\ZZ/n}(\cC)[1] \to {}_n(\ker \rho)[3]
\end{equation}
and
\begin{equation} \label{exactriang2}
T_{\ZZ/n}(\widehat \cC)[1] \to {\widehat \cC} \otimes^\LL \ZZ/n \to
\widehat{_n (\ker \rho)} \to T_{\ZZ/n}(\widehat \cC)[2]
\end{equation}
in ${\mathcal D}^b(U)$, and similar triangles for $C$,
$\widehat C$ in ${\mathcal D}^b(\spec K)$.
Note also that the objects $\cC \otimes^\LL \ZZ / n$ and $\widehat{\cC} \otimes^{\LL} \ZZ / n$ in the derived category have canonical representatives as complexes of fppf sheaves given by
\[
\cC \otimes^\LL \ZZ / n = \textup{Tot}(\cC \otimes [\ZZ \To{n} \ZZ])\quad\text{and}\quad\widehat{\cC} \otimes^{\LL} \ZZ / n = \textup{Tot}(\widehat{\cC} \otimes \ZZ / n).
\]
We also have an exact triangle in ${\mathcal D}^b(U)$:
\begin{equation} \label{devistm}
(\ker \rho)[1] \to \mathcal C \to \cok \rho \to (\ker \rho)[2],
\end{equation}
where $\cok \rho$ is a torus and $M:=\ker \rho$ is a group of multiplicative
type, and the dual exact triangle
\begin{equation} \label{devistmbis}
(\widehat{\cok \rho})[1] \to \widehat \cC \to \widehat{\ker \rho}
\to (\widehat{\cok \rho})[2].
\end{equation}
For every integer $i$, there are exact sequences
\begin{gather} \label{devis1}
\cdots\to H^i(U,\cT_1) \to H^i(U,\cT_2) \to
H^i(U,\cC) \to H^{i+1}(U,\cT_1) \to\cdots\\
\label{devis2}
\cdots\to H^i(U,\widehat \cT_2) \to H^i(U,\widehat \cT_1) \to
H^i(U,\widehat \cC) \to H^{i+1}(U,\widehat \cT_2) \to\cdots
\end{gather}
and we also have similar exact sequences for the compact support fppf
cohomology groups $H^i_\rc(U,\dots)$.
\skpt
\begin{lem} \label{fini1}
\begin{enumeratea}
\item\label{fini1a}
Let $\cT$ be a torus over $U$. Then
$H^0(U,\cT)$ and $H^1(U,\mathcal T)$
are of finite type. If~$U \neq X$, then
$H^1(U,\cT)$ is finite.
\item\label{fini1b}
Let $\cN$ be a finite group scheme of multiplicative type over
$U$. Then $H^1(U,\cN)$ and $H^2_\rc(U,\cN^D)$ are finite.
\end{enumeratea}
\end{lem}
\skpt\begin{proof}
\begin{enumeratea}
\item
Let $V$ be an étale and finite connected
Galois covering of $U$ such that $\cT_V:=\cT \times_U V$
is isomorphic to $\G^r$ for some non negative integer $r$.
The group $\cT(V) \simeq
H^0(V,\G)^r$ is of finite type by Dirichlet's theorem on units. Therefore
$H^0(U,\cT) \subset H^0(V,\cT)=\cT(V)$
is also of finite type.
Set $G=\gal(V/U)$. Then the Hochschild-Serre spectral sequence provides an
exact sequence
\[
0 \to H^1(G,\cT(V)) \to H^1(U,\cT)
\to H^1(V,\cT_V).
\]
Since $\cT_V \cong \G^r$, the group
$H^1(V,\cT_V) \cong (\pic V)^r$ is of finite type
(\resp finite if $U \neq X$) by finiteness of the ideal class group
of a global field.
As $\cT(V)$ is of finite type and $G$ is finite, the group
$H^1(G,\cT(V))$ is finite by \cite[Chap.\,VIII, Cor.\,2]{col}.
Thus $H^1(U,\cT)$ is of
finite type (\resp finite if $U \neq X$) as well.
\item
We can assume (by (\cite[Lem.\,III.8.9]{MilADT}
and \cite[Cor.\,4.9]{DemH}) that $U \neq X$.
Since every finitely generated Galois module is a quotient of a
torsion-free and finitely generated Galois module, the
assumption that $\cN$ is of multiplicative type implies
(by~\cite[X, Prop.\,1.1]{sga3})
that there is an exact sequence of $U$-group schemes
\[
0 \to \cN \to \cT_1 \to \cT_2 \to 0,
\]
where $\cT_1$ and $\cT_2$ are $U$-tori. Therefore, there is
an exact sequence of abelian groups
\[
H^0(U,\cT_2) \to H^1(U, \cN) \to H^1(U, \cT_1).
\]
By \eqref{fini1a}, we know that $H^1(U, \cT_1)$ is finite. Let $n$ be the order
of $\cN$; then the map $H^0(U,\cT_2) \to H^1(U, \cN)$
factorizes through a map $H^0(U,\cT_2)/n \to H^1(U, \cN)$.
But $H^0(U,\cT_2)/n$ is finite because $H^0(U,\cT_2)$
is of finite type by \eqref{fini1a}. Finally $H^1(U, \cN)$ is finite. The
finiteness of $H^2_\rc(U,N^D)$ follows by Artin-Mazur-Milne
duality (\cite[Th.\,1.1]{DemH}).\qedhere
\end{enumeratea}
\end{proof}
\begin{rema} \label{fini2}
By dévissage, the finiteness of $H^1(U, \cN)$ holds for
a (not necessarily finite)
group of multiplicative type $\cN$
because such a group is an extension of
a finite group by a torus. Recall also (\cite[Lem.\,III.8.9]{MilADT}
and \cite[Cor.\,4.8]{DemH})
that for every finite and flat commutative
group scheme $\cN$ over $U$, the groups $H^i(U,\cN)$ and
$H^{3-i}_\rc(U,\cN)$ are finite if $i \neq 1$ or if $U=X$, and
also if $p$ does not divide the order of $\cN$ (by \cite[Prop.\,2.1\,(4)]{DemH} and \cite[Th.\,II.3.1]{MilADT}).
Besides these groups are trivial if $i \geq 4$ (this is part of \cite[Th.\,1.1]{DemH}).
\end{rema}
For an fppf sheaf (or a bounded complex of fppf sheaves)
$\cF$ on $U$ with generic fiber $F$, we set (\cf exact
sequence \eqref{suppcomp})
\[
D^i(U,\cF)=\Ker [H^i(U, \cF) \to
\bigoplus_{v \not \in U} H^i(K_v,F)]=\Im
[H^i_\rc(U,\cF) \to H^i(U,\cF)].
\]
\begin{lem} \label{bhn}
We have $D^2(U,\G)=0$.
\end{lem}
\begin{proof} Let $\FF_v$ be the residue field of $K_v$.
By \cite[Prop.\,II.1.1\,(b)]{MilADT},
we have
\[
H^2(\cO_v,\G)=\br \cO_v \cong \br \FF_v=0
\]
because $\FF_v$ is finite.
The Brauer group $\br U$ of $U$ injects into $\br K$
(\cite[Cor.\,IV.2.6]{MilEC}). Now every element of
$D^2(U,\G) \subset \br U \subset \br K$ has trivial restriction to $\br K_v$
for all places $v$ of $K$, hence it is trivial by Brauer-Hasse-Noether
Theorem (\cite[Th.\,VIII.1.17]{nsw}).
\end{proof}
\pagebreak[2]
\begin{lem} \label{h1lem}
Let $\mathcal T$ be a $U$-torus with generic fiber $T$.
\begin{enumeratea}
\item\label{h1lema}
The group $H^1(U,\widehat\cT)$ is finite;
the groups $H^0(U,\widehat\cT)$ and $H^0_\rc(U,\widehat\cT)$
are of finite type and torsion-free. The group $H^1_\rc(U,\widehat\cT)$
is of finite type.
\item\label{h1lemb}
The group $H^2_\rc(U,\mathcal T)$ is finite. In particular, if $U=X$, then
$H^2(X,\cT)$ is finite.
\item\label{h1lemc}
Assume $U \neq X$. Then $H^2_\rc(U, \widehat \cT)$ is finite.
\item\label{h1lemd}
Assume $i \geq 4$. Then $H^i(U,\widehat \cT)\!=\!H^i_\rc(U,\widehat
\cT)\!=\!0$. If $U\!\neq\!X$,
then $H^3(U,\widehat \cT)\!=\!0$.
\item\label{h1leme}
If $U=X$, then $H^3(U,\widehat \cT)=H^3(X,\widehat \cT)$ is finite.
\end{enumeratea}
\end{lem}
\skpt
\begin{proof}
\begin{enumeratea}
\item
Let $V$ be a finite connected Galois étale covering of $U$ such that
$\cT \times_U V$ is split. Let $L$ be the function field
of $V$ and set $G=\gal(L/K)$. We have
$H^1(V,\ZZ)=0$ because $H^1(V,\ZZ)$ injects into $H^1(L, \ZZ)$
by Leray spectral sequence.
Therefore, we have $H^1(V,\widehat\cT)=0$,
hence the group $H^1(U,\widehat \cT)$ identifies
(by the Hochschild-Serre spectral sequence) to a subgroup of
$H^1(G,\widehat T)$, which is finite because $\widehat T$ is a
$G$-module of finite type. The assertion about $H^0(U,\widehat\cT)$
(which is a subgroup of $H^0(K,\widehat T)$) and $H^0_\rc(U,\widehat\cT)
\subset H^0(U,\widehat\cT)$ is obvious (we even have
$H^0_\rc(U,\widehat\cT)=0$ if $U \neq X$). Also the exact sequence\vspace*{-3pt}
\[
\bigoplus_{v \not \in U} H^0(K_v,\widehat T) \to H^1_\rc(U,\widehat \cT) \to
H^1(U,\widehat \cT)
\] shows shat $H^1_\rc(U,\widehat \cT)$ is of finite type.
\item
By \eqref{suppcomp}, there is an exact sequence\vspace*{-3pt}
\[
\bigoplus_{v \not \in U} H^1(K_v,T) \to H^2_\rc(U, \mathcal T)
\to D^2(U,\mathcal T) \to 0.
\]
The groups $H^1(K_v,T)$ are finite (\cite[Cor.\,I.2.3]{MilADT}).
Since we have $D^2(V,\G)=0$ by Lemma~\ref{bhn},
a restriction-corestriction argument
shows that $D^2(U,\mathcal T)$ is a subgroup of $_n H^2(U,\mathcal T)$,
where $n=\# \gal(V/U)$.
By the Kummer sequence in the fppf topology\vspace*{-3pt}
\[
0 \to {}_n \mathcal T \to \mathcal T \To{\cdot n} \mathcal T \to 0,
\]
the group $_n H^2(U,\mathcal T)$ is a quotient of
$H^2(U,{}_n \mathcal T)$, which is finite (even if $p$ divides $n$,
\cf Remark~\ref{fini2}). Thus $H^2_\rc(U,\mathcal T)$ is finite.
\item
Let $n >0$. Using the exact sequence in the fppf topology\vspace*{-3pt}
\begin{equation} \label{dualkummer}
0 \to \widehat\cT \To{\cdot n} \widehat\cT \to
\widehat\cT/n \to 0,
\end{equation}
we see that $_n H^2_\rc(U,\widehat\cT)$ is a quotient of
$H^1_\rc(U,\widehat\cT/n)$, which is finite (see Remark~\ref{fini2}).
It is therefore sufficient to show that $H^2_\rc(U,\widehat\cT)$ is
of finite exponent, and by a restriction-corestriction argument, we
reduce to the case $\widehat\cT=\ZZ$. As $H^1(K_v,\ZZ)=0$,
we have
\[
H^2_\rc(U,\ZZ)=\Ker [H^2(U,\ZZ) \to \bigoplus_{v \not \in U} H^2(K_v,\ZZ)].
\]
By \cite[Lem.\,II.2.10]{MilADT}, this yields
\[
H^2_\rc(U,\ZZ) \cong \Ker [H^1(U,\QQ/\ZZ) \to
\bigoplus_{v \not \in U} H^1(K_v,\QQ/\ZZ)],
\] hence
\[
H^2_\rc(U,\ZZ) \cong
\Ker [H^1(G_S,\QQ/\ZZ) \to \bigoplus_{v \not \in U} H^1(K_v,\QQ/\ZZ)].
\]
Therefore, $H^2_\rc(U,\ZZ)$ is a subgroup of $H^1(\gal(L/K),\QQ/\ZZ)$, where
$L \subset K_S$
is the maximal abelian extension of $K$ that is unramified outside $S$
and totally decomposed at every $v \in S=X \setminus U$.
The group $\gal(L/K)$ is isomorphic to $\pic U$ by class field
theory, which implies that it is finite because $U \neq X$. Hence
$H^2_\rc(U,\ZZ)$ is finite, which proves \eqref{h1lemc}.
\item
For $i \geq 4$, the groups $H^i_\rc(U,\widehat \cT)$ and $H^i(U, \widehat \cT)$
coincide thanks to exact sequence \eqref{suppcomp} because
the local field $K_v$ is of strict cohomological dimension $2$
(\cite[Cor.\,7.2.5]{nsw}).
Assume $U \neq X$ and $i \geq 3$. Then, by \cite[Prop.\,II.2.9]{MilADT},
we have $H^i(U,\widehat \cT)=H^i(G_S,\widehat T)$,
which is zero: indeed, $G_S$ is of strict cohomological dimension~$2$ by \cite[Th.\,8.3.17]{nsw}.
It remains to deal with the case $U=X$ (now we assume $i \geq 4$).
By \cite[Lem.\,II.2.10]{MilADT}, the group
$H^i(X,\ZZ)$ is torsion; by a restriction-corestriction argument, the
same holds for $H^i(X,\widehat \cT)$. Since $\QQ$ is uniquely
divisible, this yields
\[
H^i(X,\widehat \cT)=H^{i-1}(X,\widehat \cT \otimes \QQ/\ZZ)=
\varinjlim_n H^{i-1}(X,\widehat \cT/n).
\]
For $i \geq 5$, the group $H^{i-1}(X,\widehat \cT/n)$ is zero
(\cf Remark~\ref{fini2}), so we are done. Assu\-me $i=4$.
We observe that the finite group
$H^3(X,\widehat \cT/n)$ is dual to $H^0(X,{}_n \cT)$ by
Artin-Mazur-Milne duality (\cite[Th.\,1.1]{DemH}), so the dual of
the discrete torsion group $H^4(X,\widehat \cT)$ is the
profinite group
\[
\varprojlim_n H^0(X,{}_n \cT)=\varprojlim_n {_n (T(K))}
\]
(the equality holds because the $X$-group scheme $_n \cT$ is finite and
$X$ is connected). But $K$ is a global field,
hence $T(K)_\tors$ is finite: indeed, if $L$ is a finite extension
of $K$ such that $T$ splits over $L$, then $T(K) \subset T(L)$ with
$T(L) \simeq (L^*)^r$ for some $r$, and $L^*$ contains only finitely
many roots of unity.
Therefore, $T(K)$ has trivial Tate module, which yields the result.
\item
Using exact sequence \eqref{dualkummer}, we get a surjection
$H^2(X,\widehat \cT /n) \to {}_n H^3(X, \widehat \cT)$, so it is sufficient
(by Remark~\ref{fini2}) to show that $H^3(X, \widehat \cT)$ is of finite
exponent. By~restriction-corestriction, we can therefore assume that
$\widehat \cT=\ZZ$.
By the same method as in \eqref{h1lemd}, we get that the dual of
$H^3(X,\ZZ)$ is $\varprojlim_n H^1(X,\mu_n)$. As~$H^0(X,\G)=k^*$ because
$X$ is a proper and geometrically integral curve,
we get an exact sequence of finite groups
\[
0 \to k^*/k^{*^n} \to H^1(X,\mu_n) \to {}_n \pic X \to 0.
\]
Since $\pic X$ is of finite type, we have $\varprojlim_n (_n \pic X)=0$,
hence $\varprojlim_n H^1(X,\mu_n)$ is the inverse limit of the $k^*/k^{*^n}$,
which is $k^*$ itself because $k$ is finite. Thus $H^3(X,\ZZ)$ is
the dual of $k^*$, which is finite (but not zero).\qedhere
\end{enumeratea}
\end{proof}
\begin{rema} \label{xcase}
Assume $U=X$. Then the group $H^2_\rc(U,\widehat \cT)=H^2(X, \widehat \cT)$
is in general infinite: for example $H^2(X,\ZZ) \cong H^1(X,\QQ/\ZZ)$ is the
dual of the étale fundamental group $\pi_1^{\et}(X)$ and the latter is
an extension of $\gal(\kbar/k)=\widehat \ZZ$; therefore
$H^2(X,\ZZ)$ contains a copy of $\QQ/\ZZ$.
\end{rema}
\begin{prop} \label{finityp}
Let $\cC=[\cT_1 \To{\rho} \cT_2]$ be a complex of $U$-tori with
generic fiber $C=[T_1 \to T_2]$.
\begin{enumeratea}
\item\label{finitypa}
Let $i \in \{-1, 0\}$. Then the groups $H^i(U,\widehat \cC)$
and $H^i_\rc(U,\widehat \cC)$ are of finite type, and the
restriction map $H^i(U,\widehat \cC) \to H^i(K,\widehat C)$ is an isomorphism.
The restriction map $H^1(U,\widehat \cC) \to H^1(K,\widehat C)$ is injective.
If $U \neq X$, then $H^1_\rc(U,\widehat \cC)$ is of finite type.
\item\label{finitypb}
The groups $H^{-1}(U,\mathcal C)$ and $H^{-1}_\rc(U,\mathcal C)$
are of finite type, and so is $H^0(U,\cC)$.
If $U=X$, then $H^1(U,\cC)=H^1(X,\cC)$ is of finite type.
\item\label{finitypc}
Assume $U \neq X$. Then $D^1(U,\cC)$ and $D^1(U,\widehat \cC)$ are finite.
\end{enumeratea}
\end{prop}
\skpt
\begin{proof}
\begin{enumeratea}
\item
The fact that $H^i(U,\widehat \cC)$
and $H^i_\rc(U,\widehat \cC)$ are of finite type for $i \in \{-1,0\}$
follows immediately by dévissage (\cf exact sequences \eqref{devis2}
and \eqref{suppcomp}) from Lemma~\ref{h1lem}\,\eqref{h1lema}, and we even have
$H^{-1}_\rc(U,\widehat \cC)=0$ if $U \neq X$. For a $U$-torus
$\cT$, the restriction map $H^0(U, \widehat \cT) \to H^0(K,\widehat T)$
obviously is an isomorphism. Let $V$ be a connected Galois covering
of $U$ with function field $L$ and group $G$,
such that $\cT$ splits over $V$. As seen before,
we have $H^1(V,\ZZ)=H^1(L,\ZZ)=0$, hence
$H^1(V,\widehat \cT)=H^1(L,\widehat T)=0$. By~the
Hochschild-Serre spectral sequence
we get $H^1(U,\widehat \cT) \cong H^1(K,\widehat T)$ because both groups
identify to $H^1(G,\widehat T)$. By \cite[Lem.\,II.2.10]{MilADT}, we have
\[
H^2(U,\widehat \cT) \cong H^1(U,\widehat \cT \otimes \QQ/\ZZ)=
\varinjlim_{n >0} H^1(U, \widehat \cT/n),
\]
and $H^1(U, \widehat \cT/n) \hto H^1(K,\widehat T/n)$
because $\widehat \cT/n$ is a finite $U$-group scheme, which implies
$H^2(U,\widehat \cT) \hto H^2(K,\widehat T)$.
The commutative diagram with exact lines
\[
\xymatrix@C=5mm{
0 \ar[r]& H^i(U,\widehat \cT_1) \ar[r]\ar[d]& H^i(U,\widehat \cT_2) \ar[r]\ar[d]&
H^i(U, \widehat \cC) \ar[r]\ar[d]&
H^{i+1}(U,\widehat \cT_1) \ar[r]\ar[d]& H^{i+1}(U,\widehat \cT_2)\ar[d]\\
0 \ar[r]& H^i(K,\widehat \cT_1) \ar[r]& H^i(K,\widehat T_2) \ar[r]& H^i(K,\widehat C)
\ar[r]& H^{i+1}(K,\widehat T_1) \ar[r]& H^{i+1}(K,\widehat T_2)
}
\]
and the five lemma
now give that the restriction map $H^{i}(U, \widehat \cC) \to
H^{i}(K,\widehat C)$ is an
isomorphism for $i \in \{-1,0\}$, and is injective for $i=1$.
The fact that $H^1_\rc(U, \widehat \cC)$ is of finite
type if $U \neq X$ is immediate by dévissage thanks to Lemma~\ref{h1lem}\,\eqref{h1lemc}.
\item
The first two assertions follow
from Lemma~\ref{fini1}, using exact sequence \eqref{devis1}.
For $U=X$, every $X$-torus $T$ satisfies that $H^1(X,\cT)$ is of finite type
(Lemma~\ref{fini1}) and $H^2(X,\cT)$ is finite (Lemma~\ref{h1lem}\,\eqref{h1lemb}, whence the result.
\item
By functoriality, the image of $D^1(U,\cC)$ by the
map $u: H^1(U,\cC) \to H^2(U,\cT_1)$ is a subgroup
of $D^2(U,\cT_1)$. The latter is finite by Lemma~\ref{h1lem}\,\eqref{h1lemb},
because it is a quotient of $H^2_\rc(U,\cT_1)$. As
the kernel of $u$ is a quotient of $H^1(U,\mathcal T_2)$ (which is
finite by Lemma~\ref{h1lem}\,\eqref{h1lema},
this means that $D^1(U,\cC)$ is finite.
The group $H^2_\rc(U,\widehat \cT_2)$
is finite by Lemma~\ref{h1lem}\,\eqref{h1lemc}.
Hence $D^2(U, \widehat \cT_2)$ is finite.
On the other hand, the kernel of the map $H^1(U,\widehat \cC)
\to H^2(U,\widehat \cT_2)$ is a quotient of the group
$H^1(U,\widehat \cT_1)$, which is finite by Lemma~\ref{h1lem}\,\eqref{h1lema}.
Thus $D^1(U,\widehat \cC)$ is finite.\qedhere
\end{enumeratea}
\end{proof}
\begin{rema} \label{localisom}
The same argument as in Proposition~\ref{finityp}\,\eqref{finitypa} shows that for $v \in U$, the restriction
map $H^i(\cO_v,\widehat \cC) \to H^i(K_v,\widehat C)$
is an isomorphism for $i \in \{-1, 0\}$, and is injective for $i=1$.
\end{rema}
Recall (\cite[\S3]{demphd})
that for $v \in X^{(1)}$, given a complex $C$ of $K_v$-tori, the groups $H^{-1}(K_v,C)$ and
$H^0(K_v,C)$ are equipped with a natural Hausdorff topology (and
the groups $H^i(K_v,C)$ are endowed
with the discrete topology for $i \geq 1$, as
are all groups $H^r(K_v, \widehat C)$ for $-1 \leq r \leq 2$).
\begin{lem} \label{closedimage}
The image $I$ of the group $H^0(U,\cC)$ into $\bigoplus_{v \not \in U}
H^0(K_v,C)$ is a discrete (hence closed) subgroup, and so is the
image of $H^{-1}(U,\cC)$ into $\bigoplus_{v \not \in U} H^{-1}(K_v,C)$.
\end{lem}
\begin{proof} We can assume $U \neq X$. Let us start with the case
when $\cC=\G$.
Then $\cO_U ^*:=H^0(U,\G)$ is a discrete subgroup of $\bigoplus
_{v \not \in U} K_v^*$, because its intersection with the open subgroup
$\bigoplus_{v \not \in U} \cO_v^*$ is $H^0(X,\G)=k^*$, which is finite.
Consider now a $U$\nobreakdash-torus $\cT$. Let $W$ be a connected Galois
finite covering of $U$ (with function field $L \supset\nobreak K$)
that splits $\cT$. Let $G:=\gal(L/K)$.
By the case $\cT=\G$, the subgroup $H^0(W,\cT)$ is discrete
in $\bigoplus_{w \not \in W} H^0(L_w,T)$, so $H^0(U,\cT)$ is discrete
in $\bigoplus_{v \not \in U} H^0(K_v,T)$ because it is the intersection
of $H^0(W,\cT) \subset \bigoplus_{w \not \in W} H^0(L_w,T)$ with
$\bigoplus_{v \not \in U} H^0(K_v,T)=(\bigoplus_{w \not \in W} H^0(L_w,T))^G$.
Thus $I$ is discrete when $\cC=\cT$ is one single torus.
In the general case, exact triangle \eqref{devistm} yields a commutative
diagram with exact lines\vspace*{-8pt}
\[
\xymatrix@R=6mm{
H^1(U,\mathcal M) \ar[r]\ar[d]& H^0(U,\cC)\ar[r]^-u\ar[d]^j& H^0(U,\cT)\ar[d]\\
\bigoplus_{v \not \in U} H^1(K_v,M) \ar[r]& \bigoplus_{v \not \in U}
H^0(K_v,C) \ar[r]& \bigoplus_{v \not \in U} H^0(K_v,T),
}
\]
where $\mathcal M$ is a $U$-group of multiplicative type and $\cT$
is a $U$-torus. Since $U \neq X$, the right vertical map
is injective. As the lemma holds for $\cC=\cT$,
the image $J$ of $H^0(U,\cT)$ into
$\bigoplus_{v \not \in U} H^0(K_v,T)$ is discrete,
hence there is an open subgroup $H$ of $\bigoplus_{v \not \in U} H^0(K_v,T)$
such that $J \cap H=\{0\}$. Let $H_1$ be the inverse image of $H$ in
$\bigoplus_{v \not \in U} H^0(K_v,C)$, it is an open subgroup of
$\bigoplus_{v \not \in U} H^0(K_v,C)$ such
that $j^{-1}(H_1)$ is a subgroup of $\ker u$. As
$H^1(U,\mathcal M)$ is finite (Remark~\ref{fini2}), we also have that
$\ker u$ is finite and so is $j^{-1}(H_1)$. Therefore, $I \cap H_1
=j(j^{-1}(H_1))$ is finite, which implies that~$I$ is discrete.
The same result for the image of $H^{-1}(U,\cC)$ into $\bigoplus_{v \not \in U}
H^{-1}(K_v,C)$ follows immediately because $H^{-1}(U,\cC)$ is a subgroup
of $H^0(U,\cT_1)$ (which has just been shown to be a discrete subgroup
of $\bigoplus_{v \not \in U} H^0(K_v,T_1)$), and $\bigoplus_{v \not \in U}
H^{-1}(K_v,C)$ is a topological subspace of
$\bigoplus_{v \not \in U} H^0(K_v,T_1)$.
\end{proof}
\begin{rema} \label{nocdn}
The analogue of Lemma~\ref{closedimage} does not hold over a number field
as soon as at least one finite place of $K$ is not in $U$ and $K$ has at
least two non archimedean places: indeed, for the exact sequence\vspace*{-3pt}
\[
0 \to H^0(U,\G) \to \bigoplus_{v \not \in U} H^0(K_v,\G) \to
H^1_\rc(U,\G) \to H^1(U,\G) \to 0
\]
to hold (\cf \cite[beginning of \S 2]{DemH}),
the groups $H^0(K_v,\G)$ at the archimedean places
must be understood as the \emph{modified} Tate group ${\widehat H}^0(K_v,\G)$.
The intersection~$I$ of~$H^0(U,\G)$ with
the compact subgroup
$\bigoplus_{v \not \in U} \cO_v^* \subset
\bigoplus_{v \not \in U} H^0(K_v,\G) $ (where by convention $\cO_v^*$
means ${\widehat H}^0(K_v,\G)$ at the archimedean places) is countable
and infinite (it is isomorphic to $\cO_K^*$),
hence $I$ is not compact by Baire's Theorem.
Therefore, the image of $H^0(U,\G)$ in $\bigoplus_{v \not \in U} H^0(K_v,\G)$
is not closed.
\end{rema}
Equip the finitely generated group $H^0(U,\cC)$ with the discrete
topology. We give $H^0_\rc(U, \cC)$ the unique topology such that all maps in
the exact sequence
\begin{equation} \label {toph0c}
H^{-1}(U,\cC)
\to \bigoplus_{v \not \in U} H^{-1}(K_v,C) \to H^0_\rc(U, \cC) \to H^0(U,\cC)
\end{equation}
are strict (by Lemma~\ref{closedimage}, the left map is strict and the
quotient of $\bigoplus_{v \not \in U} H^{-1}(K_v,C)$ by the image of
$H^{-1}(U,\cC)$ is a locally compact Hausdorff group).
We also give the finite group (\cf Proposition~\ref{finityp}\,\eqref{finitypc}
$D^1(U,\cC)$ the discrete topology, and topologize $H^1_\rc(U,\cC)$ such that
all maps in the exact sequence
\begin{equation} \label {toph1c}
H^0(U,\cC) \to \bigoplus_{v \not \in U} H^0(K_v,C) \to H^1_\rc(U, \cC) \to D^1(U,\cC) \to 0
\end{equation}
are strict.
\begin{defi}
Define ${\mathcal E}$ as the class of those abelian topological groups
$A$ that are an extension
\begin{equation} \label{extgroup}
0 \to P \to A \To{\pi}F \to 0
\end{equation}
(the maps being continuous)
of a finitely generated group $F$ (equipped with the
discrete topology) by a profinite group $P$ (this implies that all maps
in this exact sequence are strict by \cite[Lem.\,3.4]{DemH}).
\end{defi}
It is easy to check that
for every group $A$ in $\mathcal E$, a closed subgroup of $A$ and
the quotient of $A$ by any closed subgroup of $A$ are still in $\mathcal E$.
Also a topological extension of a (discrete) finitely generated group by $A$
stays in $\mathcal E$. Finally, every group~$A$ in~$\mathcal E$ is isomorphic
to the direct product of a finitely generated
group (equipped with discrete topology) by a profinite group: indeed, up to replacing $F$ by
$F/F_\tors$ and $P$ by $\pi^{-1}(F_\tors)$
in the extension \eqref{extgroup}, we can assume
that $F=\ZZ^r$ for some $r \geq 0$. Since $F$ is free, the morphism
$\pi$ has a section $s: F \to A$, which is automatically continuous
because $F$ is discrete. Setting $B=s(F)$, we get a topological isomorphism
$A \cong P \times B$.
\begin{defi}
Let $A$ be an abelian group. For every prime number $\ell$,
the \emph{$\ell$-adic completion} of $A$ is
\[
A^{(\ell)}:=\varprojlim_{m \in \NN} (A/\ell^m).
\] We also
set
\[
A_{\wedge}:=\varprojlim_{n \in \NN^*}
A/n=\tprod_{\ell \, \mathrm{prime}} A^{(\ell)}.
\]
The piece of notation $A \{\ell\}$ stands for the $\ell$-primary
torsion subgroup of $A$.
\end{defi}
For $A$ finitely generated, we have
$A^{(\ell)}=A \otimes_{\ZZ} \ZZ_{\ell}$; since $\ZZ_{\ell}$ is a torsion-free
(hence flat) $\ZZ$-module, the functors $A \mto A^{(\ell)}$ and
$A \mto A_{\wedge}$ are exact in the category of finitely generated
abelian groups.
\pagebreak[2]
\begin{lem} \label{exactcomp}
Let $A \to B \to E \to 0$ be an exact sequence of abelian groups.
\begin{enumeratea}
\item\label{exactcompa}
The induced map $B^{(\ell)} \to E^{(\ell)}$ is surjective.
\item\label{exactcompb}
If $_{\ell} E$ is finite, then the induced sequence
\[
A^{(\ell)} \to B^{(\ell)} \to E^{(\ell)} \to 0
\]
is exact. Likewise if $A/\ell$ is finite.
\end{enumeratea}
\end{lem}
\skpt
\begin{proof}
\begin{enumeratea}
\item
Since the functor $. \otimes_{\ZZ} \ZZ/\ell^m$ is right exact,
the sequence
\[
A/\ell^m \to B/\ell^m \to E/\ell^m \to 0
\]
is exact. Therefore, the projective system
$(\ker [B/\ell^m \to E/\ell^m])_{m \geq 1}$
has surjective transition maps, which
implies that the map $\varprojlim_m (B/\ell^m) \to \varprojlim_m (E/\ell^m)$
remains surjective.
\item
Assume that $_{\ell} E $ is finite. Then
(by induction on $m$) we also have that $_{\ell^m} E$ is finite
for every positive integer $m$ thanks to the exact sequence
\[
_{\ell} E \to{}_{\ell^{m+1}} E \To{\cdot\ell}{}_{\ell^m} E.
\]
Let $I \subset B$ be the image of $A$ by the map $A \to B$.
By \eqref{exactcompa}, the map $A^{(\ell)} \to I^{(\ell)}$ is surjective, so
it is sufficient to prove that the sequence
\[
I^{(\ell)} \to B^{(\ell)} \to E^{(\ell)}
\]
is exact. By the snake lemma, we have an exact sequence
\[
_{\ell^m} E \to I/\ell^m \to B/\ell^m \to E/\ell^m.
\]
Taking projective limit over $m$ yields the required exact sequence
because the kernel of the map $I/\ell^m \to B/\ell^m$ is finite
(it is a quotient of $_{\ell^m} E$). Similarly, if $A/\ell$ is finite,
then $A/\ell^m$ (hence also $I/\ell^m$) is finite for every positive
$m$ and the same argument works.\qedhere
\end{enumeratea}
\end{proof}
If we assume further that $A$ is a topological
abelian group, its \emph{profinite completion} is
$A^{\wedge}:=\varprojlim_H (A/H)$,
where $H$ runs over all open subgroups of finite index
in $A$. If $A$ is profinite, then $A=A_{\wedge}=A^{\wedge}$. If $A$ is in
the class $\mathcal E$, then $A \hto A_{\wedge}=A^{\wedge}$.
\begin{prop} \label{injectcompl}
Let $\mathcal C=[\cT_1 \to \cT_2]$ be a complex of $U$-tori with generic fiber
$C=[T_1 \to T_2]$. Let $v \in X^{(1)}$.
The topological groups $H^{-1}(K_v,C)$ and $H^0(K_v,C)$ are
in $\mathcal E$, as are
the groups $H^0_\rc(U,\cC)$ and $H^1_\rc(U,\cC)$. In particular, for
$i \in \{-1, 0\}$, we have $H^i(K_v,C)_{\wedge}=H^i(K_v,C)^{\wedge}$
and for $i \in \{0, 1\}$, we have $H^i_\rc(U,\cC) \hto
H^i_\rc(U,\cC)_{\wedge}$.
\end{prop}
\begin{proof} Let $\cT$ be a
$U$-torus with generic fiber $T$.
Let $v$ be a closed point of $X$ and let $L$ be a finite
Galois extension of $K_v$ such
that $\cT$ splits over $L$. As $L^* \simeq \ZZ \times \cO_L^*$
is in $\mathcal E$, so is $T(L)$.
Then $H^0(K_v,T)$ is in $\mathcal E$
as a closed subgroup of $T(L)$ (the subgroup
of $\gal(L/K_v)$-invariants). The exact sequence
\[
H^0(K_v,T_1) \to H^0(K_v,T_2) \to H^0(K_v,C) \to H^1(K_v,T_1)
\]
and the definition of the topology on $H^0(K_v,C)$ now imply that
$H^0(K_v,C)$ is in $\mathcal E$. The exact sequence \eqref{toph1c}
and Lemma~\ref{closedimage} yield that $H^1_\rc(U,\cC)$ is in $\mathcal E$
because $D^1(U,\cC)$ is finite.
Similarly the group $H^{-1}(K_v,C)=\ker [H^0(K_v,T_1) \to H^0(K_v,T_2)]$ is
a closed subgroup of $H^0(K_v,T_1)$, hence is in $\mathcal E$.
This implies that $H^0_\rc(U,\cC)$ is in $\mathcal E$ thanks to the exact
sequence \eqref{toph0c},
the group $H^0(U,\cC)$ being of finite type by Proposition~\ref{finityp}.
\end{proof}
\begin{lem} \label{vanishlocal}
Let $v \in U$ and let $\cC$ be a complex of $\cO_v$-tori.
Then $H^i(\cO_v, \cC)=0$ for $i \geq 1$.
\end{lem}
\begin{proof} Using the exact sequence \eqref{devis1} with $U$ replaced
by $\cO_v$, we can assume that $\mathcal C=\mathcal T$ is one single
torus. Since $\mathcal T$ is smooth over $\cO_v$, the fppf
cohomology group $H^i(\cO_v, \cT)$ coincides with the étale
group, and it is isomorphic (\cite[Prop.\,II.1.1\,(b)]{MilADT})
to the Galois cohomology group
$H^i(\FF_v,\tilde T)$, where $\FF_v$
is the residue field of $\cO_v$ and $\tilde T$ the reduction of
$\mathcal T$ mod. $v$, which is a torus over the finite field~$\FF_v$. Now $H^1(\FF_v,\tilde T)=0$ by Lang's theorem (\cite{lang}).
For $i \geq 2$, the Galois cohomology group $H^i(\FF_v,\tilde T)$ is torsion.
Let $n >0$. By the Kummer sequence applied to the torus $\tilde T$
over the perfect field $\FF_v$, the $n$-torsion
subgroup $_n H^i(\FF_v,\tilde T)$ is a quotient of $H^i(\FF_v, {}_n T)$, which
is zero because $\FF_v$ is of cohomological dimension $1$ (\cite[Chap.\,XIII, Prop.\,2]{col}). This proves the lemma.
\end{proof}
\begin{rema} \label{cdn1}
Using the definition of fppf compact support cohomology
given in \cite{DemH} (which, in particular, takes care of the
set $\Omega_{\RR}$ of real places; see loc.\,cit., Prop.\,2.1),
most results of this section hold (with the same proof) if
we replace $K$ by a number field with ring of integers $\cO_K$,
$X$ by $\spec \cO_K$, and
$U$ by a non empty Zariski open subset of $X$. Also the piece of notation
$v \not \in U$ means that we consider the closed points of
$X\setminus U$ \emph{and}
the real places of $K$; for $v \in \Omega_{\RR}$ and $i \leq 0$,
the groups $H^i(K_v,\dots)$
must be understood as the modified Tate groups (\cf Remark~\ref{nocdn}).
More precisely:
\begin{itemize}
\item Lemma~\ref{fini1}\,\eqref{fini1a} holds without the restriction $U \neq X$; \eqref{fini1b} and Remark~\ref{fini2} are useless because for every finite flat commutative
$U$-group scheme $\cN$, all groups $H^i(U,\cN)$
and $H^i_\rc(U,\cN)$ are finite (\cf \cite[Th.\,1.1]{DemH}).
\item Lemma~\ref{h1lem}\,\eqref{h1lema} and \eqref{h1lemb} are unchanged; \eqref{h1lemc} holds without the
restriction $U \neq X$. In \eqref{h1lemd}, the vanishing of $H^i_\rc(U,\widehat \cT)$
for $i \geq 4$ still holds but the proof uses a different argument (namely
that the dual of this group is the inverse limit of the $H^{4-i}(U, {}_n \cT)$,
which is zero even in the case $i=4$ because the finitely generated
group $H^0(U,\cT)$ has trivial Tate module). The vanishing
of $H^i(U,\widehat \cT)$ for $i \geq 4$ must be replaced by its finiteness if
$\Omega_{\RR} \neq \emptyset$.
Finally, \emph{the vanishing of $H^3(U,\widehat \cT)$ does not
hold any more}, even if $\Omega_{\RR}=\emptyset$
(if Leopoldt's conjecture is assumed, then
$H^3(U,\widehat \cT) \{\ell\}=0$ for $\ell$ invertible on $U$, but
not in general for other primes; \cite[Th.\,II.4.6\,(b)]{MilADT} is wrong for
$r=3$, the problem in the proof being that the second line of the diagram
needs not remain exact after taking profinite completions); neither does \eqref{h1leme} hold as soon as there are at least two archimedean places. Also, there is no more counterexample as in Remark~\ref{xcase}.
\item Proposition~\ref{finityp}\,\eqref{finitypa} and \eqref{finitypc}
hold (without the condition $U \neq X$),
\eqref{finitypb} is also true (and when $U=X$, the group $H^1(X,\cC)$ is even finite).
\end{itemize}
\end{rema}
\section{Duality theorems in fppf cohomology} \label{two}
In order to state and prove duality results for the cohomology of complexes of fppf sheaves, we need to extend some constructions from \cite{DemH} to the context of bounded complexes.
Let $A$ and $B$ be two bounded complexes of fppf sheaves over $U$. Following \cite[XVII,\,4.2.9]{SGA4} or \cite[App.\,A]{friedsus}, one can consider the Godement resolutions $G(A)$ and $G(B)$ of $A$ and $B$. As in \cite[II.6.6]{God} or in \cite[App.\,A]{friedsus}, there is a natural commutative diagram of complexes
\[
\xymatrix{
A \otimes B \ar[rd] \ar[d] & \\
\textup{Tot}(G(A) \otimes G(B)) \ar[r] & G(A \otimes B).
}
\]
Following \cite[Proof of Lem.\,4.1]{DemH}, one gets a functorial morphism of complexes
\begin{equation} \label{cup complexes}
\textup{Tot}(\Gamma_\rc(U, G(A)) \otimes \Gamma(U,G(B))) \to \Gamma_\rc(U,G(A \otimes B))
\end{equation}
and a functorial pairing
\[
R\Gamma_\rc(U,A) \otimes^{\LL} R\Gamma(U,B) \to R\Gamma_\rc(U,A \otimes B).
\]
In particular, if $C$ is a bounded complex and $\widehat{C}:= \underline{\textup{Hom}}^\sbullet(C, \Gm[1])$ its dual, using the morphism $\textup{Tot}(C \otimes \widehat{C}) \to \Gm[1]$ from Section~\ref{one}, we get functorial pairings
\[\textup{Tot}(\Gamma_\rc(U, G(C)) \otimes \Gamma(U,G(\widehat{C}))) \to \Gamma_\rc(U,G(\Gm[1]))
\]
and
\begin{equation} \label{pairing derived}
R\Gamma_\rc(U,C) \otimes^{\LL} R\Gamma(U,\widehat{C}) \to R\Gamma_\rc(U,\Gm[1]).
\end{equation}
Following Section~\ref{one}, given a bounded complex $\cC$ of finite flat commutative group schemes over $U$, there is a natural topology on the abelian groups $H^i_\rc(U, \cC)$. This topology is profinite via Lemma \ref{lem topo profinite}, and considering $H^j(U, \widehat{\cC})$ as discrete torsion groups, the pairings
\[
H^i_\rc(U, \cC) \times H^j(U, \widehat{\cC}) \to H^{i+j+1}_\rc(U, \G)
\]
are continuous by the same argument as \cite[Lem.\,4.4]{DemH}.
\begin{prop} \label{AMM complex}
Let $\cC$ be a bounded complex of finite flat commutative group schemes over $U$.
For all $i \in \ZZ$, there is a perfect pairing between profinite and discrete torsion groups\vspace*{-3pt}
\[
H^{2-i}_\rc(U, \cC) \times H^i(U, \widehat{\cC}) \to H^3_\rc(U,\G) \cong \QQ/\ZZ.
\]
\end{prop}
\begin{proof}
The isomorphism $H^3_\rc(U,\G) \cong \QQ/\ZZ$ follows from \cite[Prop.\,II.2.6]{MilADT} and \cite[Prop.\,2.1\,(4)]{DemH}.
We now prove the proposition by induction on the length of the complex $\cC$.
\begin{itemize}
\item if $\cC$ is concentrated in a given degree $n$, then the proposition is a direct consequence of \cite[Th.\,1.1]{DemH}.
\item assume that $\cC:= [C_r \To{f_r} C_{r+11} \to \cdots\to C_s]$, with $C_i$ in degree $i$, has length $s-r \geq 1$.
Let $A:= \ker(f_r)$, and let $\overline{\cC}:= \textup{Cone}(A[-r] \To{j} \cC)$. Then there is an exact triangle\vspace*{-3pt}
\[
A[-r] \To{j} \cC \To{i} \overline{\cC} \To{p} A[1-r].
\]
We apply the functor $\widehat{\sbullet}$ to this exact triangle. Then, using \eqref{cone and dual}, we get that the natural triangle\vspace*{-3pt}
\[
\widehat{A[1-r]} \To{\widehat{p}} \widehat{\overline{\cC}} \To{\widehat{i}} \widehat{\cC} \To{\widehat{j}} \widehat{A[-r]}
\]
is exact.
Since the pairing between a complex and its dual is functorial, we get from the previous triangles a commutative diagram of topological groups with exact rows, where the vertical maps comes from the pairings \eqref{pairing derived}:\vspace*{-3pt}
\begin{multline} \label{devissage AMM1}
\begin{array}{c}
\xymatrix@=5mm{
H^{i-1}_\rc(U, \overline{\cC}) \ar[r] \ar[d] & H^{i-r}_\rc(U, A) \ar[r] \ar[d] & H^i_\rc(U, \cC)\ar[d] \\
H^{3-i}(U, \widehat{\overline{\cC}})^* \ar[r] & H^{3+r-i}(U, A^D)^* \ar[r] & H^{2-i}(U, \widehat{\cC})^*
}
\end{array}\\
\xymatrix@=5mm{
\mbox{}\ar[r] & H^{i}_\rc(U, \overline{\cC}) \ar[r] \ar[d] & H^{i+1-r}_\rc(U, A) \ar[d] \\
\mbox{}\ar[r] & H^{2-i}(U, \widehat{\overline{\cC}})^* \ar[r] & H^{2+r-i}(U, A^D)^*.
}
\end{multline}
The second line remains exact as the dual of an exact sequence of discrete groups.
Note that we have a quasi-isomorphism $\varphi: \overline{\cC} \to \cC'$, where $\cC':= [C_{r+1}/\Im(f_r) \to C_{r+2} \to \cdots\to C_s]$ has a smaller length than $\cC$, hence by induction, we can assume that the natural maps $H^r_\rc(U, \cC') \to H^{2-r}(U, \widehat{\cC'})^*$ are isomorphisms. Since all the $C_i$'s are finite flat group schemes, we see that the dual morphism $\widehat{\varphi}: \widehat{\cC'} \to \widehat{\overline{\cC}}$ is a quasi-isomorphism, hence by functoriality of the pairings, we deduce that the maps $H^r_\rc(U, \overline{\cC}) \to H^{2-r}(U, \widehat{\overline{\cC}})^*$ are isomorphisms too.
Hence in diagram \eqref{devissage AMM1}, all vertical morphisms, except perhaps the central one, are isomorphisms. Then the five lemma implies that the central morphism is an isomorphism.
\end{itemize}
By induction on the length of $\cC$, the proposition is proved.
\end{proof}
\emph{From now on, we denote by $\cC=[\cT_1 \to \cT_2]$ a complex of $U$-tori}
with generic fiber $C=[T_1 \to T_2]$ and dual $\widehat \cC$ (\cf Section~\ref{onebis}).
As a consequence of the previous proposition, we can get the global duality results for the cohomology of the complex $\cC \otimes^\LL \ZZ /n$:
\begin{prop} \label{avfini}
Let $n$ be a positive integer (not necessarily prime to $p$).
Let $i$ be an integer with $-2 \leq i \leq 2$.
\begin{enumerate}
\item\label{avfini1} There is a perfect pairing of finite groups\vspace*{-3pt}
\[
H^i(U, \cC \otimes^\LL \ZZ/n) \times H^{1-i}_\rc(U,
\widehat \cC \otimes^\LL \ZZ/n) \to \QQ/\ZZ.
\]
If $U \neq X$, the groups $H^2(U, \cC \otimes^\LL \ZZ/n)$ and
$H^{-1}_\rc(U, \widehat \cC \otimes^\LL \ZZ/n)$ are zero.
\item\label{avfini2} There is a perfect pairing\vspace*{-3pt}
\[
H^i_\rc(U, \cC \otimes^\LL \ZZ/n) \times H^{1-i}(U,
\widehat \cC \otimes^\LL \ZZ/n) \to \QQ/\ZZ
\]
between the profinite group $H^i_\rc(U, \cC\!\otimes^\LL\ZZ/n)$
and the discrete group \hbox{$H^{1-i}(U, \widehat \cC\!\otimes^\LL\!\ZZ/n)$}.
These groups are finite if $i\!\notin\!\{0, 1\}$ or if $p$ and $n$ are
coprime. The groups\vspace*{-3pt}
\[
H^{-2}_\rc(U,\cC\otimes^\LL\!\ZZ/n)\quad\text{and}\quad
H^3(U,\widehat \cC \otimes^\LL\!\ZZ/n)
\]
are zero if
$U \neq X$.
\end{enumerate}
Moreover, all the groups involved are zero if $\vert i \vert >2$.
\end{prop}
\begin{proof}
Recall that there is a quasi-isomorphism of complexes $\psi = C' \to \cC \otimes^\LL \ZZ / n$, where $C':= [{_n T_1} \To{\rho} {_n T_2}]$, with ${_n T_1}$ in degree $-2$, and that the dual morphism $\widehat{\psi}: \widehat{\cC \otimes^\LL \ZZ / n} \to \widehat{C'} = [\widehat{T_2}/n \To{-\widehat{\rho}} \widehat{T_1}/n] = \bigl(\widehat{\cC} \otimes^\LL \ZZ / n \bigr)[-1]$ (with $\widehat{T_2}/n$ in degree $0$) is also a quasi-isomorphism.
Since $C'$ is a bounded complex of finite flat commutative group schemes, then Proposition \ref{AMM complex} implies that the pairings in the statement of the proposition are perfect pairings of topological groups.
Let us now check the finiteness and vanishing results.
Using the exact triangle \eqref{exactriang1}, we get an exact sequence:
\[
H^{i+2}(U,{_n \ker \rho}) \to H^i(U, \cC \otimes^\LL \ZZ/n) \to H^{i+1}(U, T_{\ZZ/n}(\cC)).
\]
As the finite $U$-group schemes $T_{\ZZ/n}(\cC)$ and
$_n \ker \rho$ are of multiplicative type, Lemma~\ref{fini1}
and Remark~\ref{fini2}
imply that the groups $H^r(U,T_{\ZZ/n}(\cC))$ and
$H^r(U,{}_n\!\ker \rho)$ are finite for every integer $r$. Thus
$H^i(U, \cC \otimes^\LL \ZZ/n)$ is finite.
Similarly, using the exact triangle \eqref{exactriang1}, the group $H^i_\rc(U, \cC \otimes^\LL \ZZ/n)$ is finite for
$i \not \in \{0, 1\}$ (or if $p$ and $n$ are coprime) by Remark~\ref{fini2}.
Recall that for a finite and flat group scheme $\cN$ over $U$,
we have $H^r(U,\cN)=0$ for $r <0$ (obvious), for $r \geq 4$,
and also for $r=3$ if $U \neq X$: indeed, by loc.\,cit., $H^r(U,\cN)$
is dual to $H^{3-r}_\rc(U,\cN^D)$; the latter is clearly zero if
$r \geq 4$ and
if $U \neq X$, we also have $H^0_\rc(U,\cN^D)=0$
thanks to the exact sequence
\[
0 \to H^0_\rc(U,\cN^D) \to H^0(U,\cN^D) \to
\bigoplus_{v \not \in U} H^0(K_v,N^D),
\]
the last map being injective by the assumption $U \neq X$.
The previous dévissages now yield the vanishing assertions of
the proposition.
\end{proof}
\pagebreak[2]
\begin{prop} \label{finivanish1}
Let $i$ be an integer. Let $n$ be a positive integer (not necessarily prime
to $p$).
\begin{enumeratea}
\item\label{finivanish1a}
The groups $_n H^i(U, \cC)$ and
$H^i(U, \cC)/n$ are finite. The group
$H^i(U, \cC)$ is torsion if $i \geq 2 $ (\resp if $i \geq 1$ and
$U \neq X$). Besides $H^i(U, \cC)=0$ in the following cases:
$i \geq 4$; $i \leq -2$; $i=3$ and $U \neq X$.
\item\label{finivanish1b}
The groups $_n H^i_\rc(U, \widehat \cC)$ and
$H^i_\rc(U, \widehat \cC)/n$ are finite. The group
$H^i_\rc(U, \widehat \cC)$ is torsion if $i \geq 2$, and it is
zero if $i \geq 4$ or $i \leq -2$. Assume further $U \neq X$; then
$H^i_\rc(U, \widehat \cC)=0$ for $i=-1$.
\end{enumeratea}
\end{prop}
\skpt
\begin{proof}
\begin{enumeratea}
\item
Using the exact triangle in ${\mathcal D}^b(U)$:
\[
\cC \To{\cdot n} \cC \to \cC
\otimes^\LL \ZZ/n \to \cC[1],
\]
we get an exact sequence of abelian groups
\begin{equation} \label {kummer1}
0 \to H^i(U,\cC)/n \to H^i(U,\cC \otimes^\LL \ZZ/n)
\to{}_n H^{i+1}(U,,\cC) \to 0.
\end{equation}
since $H^i(U,\cC \otimes^\LL \ZZ/n)$ is finite
(Proposition~\ref{avfini}\,\eqref{avfini1}), the finiteness of the groups
$_n H^{i+1}(U, \cC)$ and $H^i(U, \cC)/n$ follows
for all $i$.
To prove that $H^i(U, \cC)$ is torsion if $i \geq 2 $ (\resp if $U \neq X$ and $i=1$), we can restrict by dévissage (using
exact sequence \eqref{devis1}) to the case when
$\cC=\cT$ is one single torus. If $U \neq X$ and $i=1$,
this follows from Lemma~\ref{fini1}\,\eqref{fini1a}, so assume $i \geq 2$.
We can also assume by a restriction-corestriction argument
that $\cT=\G$
because the torus $\cT$ is split by some finite
étale covering of $U$.
Now $H^2(U,\G)=\br U$ is torsion because it injects into $\br K$;
also $H^3(U,\G)$ is torsion (it is
even $0$ if $U \neq X$) and $H^i(U,\G)=0$ for $i \geq 4$ by \cite[Prop.\,II.2.1]{MilADT}, the group scheme $\G$ being smooth (hence étale and fppf
cohomology coincide).
For every $U$-torus $\cT$, we have
$H^i(U,\cT)=0$ for negative $i$ (obvious), hence by dévissage
$H^i(U,\cC)=0$ for $i <-1$. Let $i \geq 3$; as seen before
$H^i(U,\cC)$ is torsion and $_n H^i(U,\cC)$ is
a quotient of $H^{i-1}(U,\cC \otimes^\LL \ZZ/n)$ by exact
sequence \eqref{kummer1}. The latter is zero if $i \geq 4$, and also
if $i=3$ when $U \neq X$ by
the vanishing assertions in Proposition~\ref{avfini}\,\eqref{avfini1}. Thus
$H^i(U,\cC)$ is zero if $i \geq 4$, and also if $i=3$ if we
assume further $U \neq X$.
\item
Similarly, the finiteness statements follow from the exact sequence
\begin{equation} \label{kummer2}
0 \to H^i_\rc(U,\widehat \cC)/n \to H^i_\rc(U,\widehat \cC
\otimes^\LL \ZZ/n) \to {}_n H^{i+1}_\rc(U,\widehat \cC) \to 0
\end{equation}
combined with Proposition~\ref{avfini}\,\eqref{avfini1}. Let $i \geq 2$. To prove that
$H^i_\rc(U,\widehat \cC)$ is torsion we can assume that $\widehat
\cC$ is the dual of a torus (via exact sequence \eqref{devis2}),
then that
$\widehat \cC=\ZZ$ (by~a restriction-corestriction argument).
Using the exact sequence
\[
\bigoplus_{v \not \in U} H^{i-1}(K_v, \ZZ) \to H^i_\rc(U, \ZZ) \to
H^i(U, \ZZ),
\]
it is sufficient to prove that $H^i(U,\ZZ)$ is torsion because the Galois
cohomology groups $H^{i-1}(K_v, \ZZ)$ are torsion for $i-1>0$. This holds
by \cite[Lem.\,II.2.10]{MilADT}.
Let $\cT$ be a $U$-torus. For each integer $i$,
there is an exact sequence
\begin{equation} \label{suppc}
\bigoplus_{v \not \in U} H^{i-1}(K_v, \widehat T) \to
H^i_\rc(U, \widehat \cT) \to H^i(U, \widehat \cT) \to
\bigoplus_{v \not \in U} H^i(K_v, \widehat T).
\end{equation}
Therefore, $H^i_\rc(U,\widehat \cT)=0$ for $i <0$, hence
$H^i_\rc(U,\widehat \cC)=0$ (by dévissage) for $i <-1$.
For $i \geq 4$, we have
$H^i_\rc(U,\widehat \cT)=0$ by Lemma~\ref{h1lem}\,\eqref{h1lemd}, and
$H^i_\rc(U,\widehat \cC)=0$ by dévissage.
Assume now $U \neq X$. Then $H^0_\rc(U,\widehat \cT)=0$ by exact sequence
\eqref{suppc} applied to $i=0$: indeed, the map
$H^0(U,\widehat \cT) \to \bigoplus_{v \not \in U}
H^0(K_v,\widehat T)$ is injective (choose a closed point $v$ of
$X\setminus U$; then
the restriction maps $H^0(U, \widehat \cT) \to H^0(K,\widehat T)$
and $H^0(K,\widehat T) \to H^0(K_v,\widehat T)$ are injective).
Therefore, $H^{-1}_\rc(U, \widehat \cC)=0$
by dévissage.\qedhere
\end{enumeratea}
\end{proof}
\begin{prop} \label{finivanish2}
Let $i$ be an integer. Let $n$ be a positive integer (not necessarily prime
to $p$).
\begin{enumeratea}
\item\label{finivanish2a}
The group $_n H^i(U,\widehat \cC)$ is finite if $i \not \in
\{1, 2\}$. The group $H^i(U,\widehat \cC)/n$ is finite if
$i \neq 1$. The group $H^i(U,\widehat \cC)$ is torsion
if $i \geq 1$, and it is zero if $i \geq 4$ or $i \leq -2$. If we assume
further $U \neq X$, then $H^3(U,\widehat \cC)=0$.
\item\label{finivanish2b}
The group $_n H^i_\rc(U,\cC)$ is finite if $i \neq 1$.
The group $H^i_\rc(U,\cC)/n$ is finite if
$i \not \in \{0,1\}$.
The group $H^i_\rc(U,\cC)$ is torsion for $i \geq 2$, and it is
zero if $i \geq 4$ or $i \leq -2$ (\resp $i=-1$ if $U \neq X$).
\end{enumeratea}
\end{prop}
\skpt
\begin{proof}
\begin{enumeratea}
\item
The exact sequence
\begin{equation} \label{kummer3}
0 \to H^i(U,\widehat \cC)/n \to H^i(U,\widehat \cC
\otimes^\LL \ZZ/n) \to{}_n H^{i+1}(U,\widehat \cC) \to 0
\end{equation}
and Proposition~\ref{avfini}\,\eqref{avfini2} yield the finiteness of
$_n H^i(U,\widehat \cC)$ for $i \not \in \{1, 2\}$
and of $H^i(U,\widehat \cC)/n$ for $i \not \in \{0, 1\}$.
Besides the abelian group $H^0(U,\widehat \cC)$ is of finite type
by Proposition~\ref{finityp}.
In particular $H^0(U,\widehat \cC)/n$ is finite.
Let $i \geq 1$. To prove that $H^i(U,\widehat \cC)$ is torsion,
we can assume (by dévissage) that $\widehat \cC=\widehat \cT$, where
$\cT$ is one single torus,
then that $\widehat \cC=\ZZ$ (by restriction-corestriction); then
the result holds by \cite[Lem.\,II.2.10]{MilADT}. For $i \leq -2$ or
$i \geq 4$ (\resp $i=3$ if $U \neq X$),
the group $H^i(U,\widehat \cC)$ is zero by
dévissage (using Lemma~\ref{h1lem}\,\eqref{h1lemd} for the latter).
\item
There is an exact sequence
\begin{equation} \label{kummer4}
0 \to H^i_\rc(U,\cC)/n \to H^i_\rc(U,\cC
\otimes^\LL \ZZ/n) \to{}_n H^{i+1}_\rc(U,\cC) \to 0
\end{equation}
By Proposition~\ref{avfini}\,\eqref{avfini2}, the group $_n H^i_\rc(U,\cC)$
is finite for $i \not \in \{1, 2\}$ and the group
$H^i_\rc(U,\cC)/n$ is finite for $i \not \in \{0, 1\}$.
To prove that the groups
$H^i_\rc(U,\cC)$ are torsion for~$i \geq 2$, we can assume
as usual that $\cC=\cT$ is a torus.
Then we apply
Proposition~\ref{finivanish1}\,\eqref{finivanish1a} and the exact sequence
\[
\bigoplus_{v \not \in U} H^{i-1}(K_v,T) \to
H^i_\rc(U,\cT) \to H^i(U,\cT).
\]
Besides $H^2_\rc(U,\cT)$ is finite by Lemma~\ref{h1lem}\,\eqref{h1lemb}, so
$H^2_\rc(U,\cC)$ is also of cofinite type by dévissage
because we already know that
$H^3_\rc(U,\cT_1)$ is torsion of cofinite type.
Obviously we have $H^i_\rc(U,\cT)=0$ for every negative $i$, hence
$H^i_\rc(U,\cC)=0$ by dévissage if $i \leq -2$. Assume $i \geq 4$.
then $H^i_\rc(U,\cC)=H^i(U,\cC)$ (apply the
exact sequence~\eqref{suppcomp} and use the fact that $K_v$ is of
strict cohomological dimension 2), so $H^i_\rc(U,\cC)=0$
by Proposition~\ref{finivanish1}\,\eqref{finivanish1a}. If we assume further $U \neq X$,
then $H^0_\rc(U,\cT)=0$ (same argument as in
Proposition~\ref{finivanish1}\,\eqref{finivanish1b}, so $H^{-1}_\rc(U,\cC)=0$ by dévissage.\qedhere
\end{enumeratea}
\end{proof}
\begin{rema} \label{nocofini}
Using Remark~\ref{fini2}, it is easy to see that the finiteness
assertions of Proposition~\ref{finivanish2} hold for every $i$ if we assume
further that $p$ does not divide $n$, but this is no longer true
in general if $U \neq X$.
Indeed the group $H^1(U,\ZZ/p)$ and its dual $H^2_\rc(U,\mu_p)$
can be infinite (\cf \cite[Lem.\,III.8.9]{MilADT}).
Since $H^1(U,\ZZ)=0$ and $_p H^2_\rc(U,\G)$ is finite,
this implies that $_p H^2(U,\ZZ)$ and $H^1_\rc(U,\G)/p$ are infinite, which gives
examples of $_p H^i(U, \widehat \cC)$ infinite for $i=1,2$ and of
$H^i_\rc(U,\cC)/p$ infinite for $i=0,1$. The complex
$\cC=[\G \To{\cdot p} \G]$ is an example with $_p H^1_\rc(U,\cC)$
and $H^1(U,\widehat \cC)/p$ infinite (indeed, $\cC$ is quasi-isomorphic
to $\mu_p[1]$ and $\widehat \cC$ is quasi-isomorphic to $\ZZ/p$).
\end{rema}
\begin{rema}
For every integer $r$ and every positive integer $n$,
the groups $H^r(U, \mathcal C)/n$ and
$H^r_\rc(U,\widehat \cC)/n$ are finite by
Proposition~\ref{finivanish1}\,\eqref{finivanish1b}, so for each prime number
$\ell$ (including $\ell=p$), the $\ell$-adic completions
\[
H^r(U,\cC)^{(\ell)}:=\varprojlim_m
H^r(U,\cC)/\ell^m; \quad
H^r_\rc(U,\widehat \cC)^{(\ell)}:=\varprojlim_m
H^r_\rc(U,\widehat \cC)/\ell^m
\]
are profinite. Exact sequence \eqref{kummer4}
shows that $H^r_\rc(U,\cC)/n$ is a closed subgroup
of the profinite group $H^r_\rc(U,\cC \otimes^\LL \ZZ/n)$,
hence $H^r_\rc(U,\cC)/n$ is profinite and so is the
$\ell$-adic completion $H^r_\rc(U,\cC)^{(\ell)}$.
\end{rema}
The map $\cC \otimes^\LL \widehat \cC \to \G[1]$
induces for every integer $r$ pairings
\begin{align} \label{leftpairing}
H^r(U, \cC) \times H^{2-r}_\rc(U,\widehat \cC) &\to
H^3_\rc(U,\G) \cong \QQ/\ZZ.
\\ \label{rightpairing}
H^r_\rc(U, \cC) \times H^{2-r}(U,\widehat \cC) &\to
H^3_\rc(U,\G) \cong \QQ/\ZZ.
\end{align}
We now prove a key lemma.
\begin{lem} \label{avlem}
Let $\ell$ be a prime number (possibly equal to $p$). Let $i$ be
an integer.
\begin{enumeratea}
\item\label{avlema}
The maps
\begin{align*}
\psi: H^{i+1}(U,\cC)\{\ell\} &\to
(H^{1-i}_\rc(U,\widehat \cC)^{(\ell)})^*
\\
\psi': H^{1-i}_\rc(U,\widehat \cC)\{\ell\} &\to
(H^{i+1}(U,\cC)^{(\ell)})^*
\end{align*}
induced by the pairing \eqref{leftpairing} are surjective
and have divisible kernel. Besides $\psi'$ is an isomorphism
if $i=-2$ and $\psi$ is an isomorphism if we have
both $i=1$ and $U \neq X$.
\item\label{avlemb}
The map
\[
\varphi: H^{i+1}(U,\widehat \cC)\{\ell\} \to
(H^{1-i}_\rc(U,\cC)^{(\ell)})^*
\]
induced by the pairing \eqref{rightpairing} is surjective, and
has divisible kernel (\resp is an isomorphism if we assume
both $i=1$ and $U=X$).
Assume $i \not \in \{-1, 0\}$. Then the map
\[
\varphi': H^{1-i}_\rc(U,\cC)\{\ell\} \to
(H^{i+1}(U,\widehat \cC)^{(\ell)})^*
\]
is surjective and has divisible kernel (\resp is an isomorphism
if $i=-2$).
\end{enumeratea}
\end{lem}
Observe that for $U \neq X$, the groups involved can be non zero only if
$-2 \leq i \leq 1$.
\skpt
\begin{proof}
\begin{enumeratea}
\item
For each positive integer $m$,
there is an exact commutative diagram of finite abelian groups,
\begin{equation} \label{finidiag1}
\begin{array}{c}
\xymatrix@C=4mm@R=8mm{
0 \ar[r]& H^i(U,\cC)/\ell^m \ar[r]\ar[d]& H^i(U,\cC \otimes^\LL\ZZ/\ell^m) \ar[r]\ar[d]&{}_{\ell^m} H^{i+1}(U,\cC)\ar[r]\ar[d]^{\psi_m}& 0\\
0 \ar[r]&({}_{\ell^m} H^{2-i}_\rc(U,\widehat \cC))^* \ar[r]& H^{1-i}_\rc(U,\widehat \cC \otimes^\LL\ZZ/\ell^m)^* \ar[r] &(H^{1-i}_\rc(U,\widehat \cC) /\ell^m)^* \ar[r]& 0.
}
\end{array}
\end{equation}
By Proposition~\ref{avfini}\,\eqref{avfini1}, the middle vertical map is an isomorphism.
Taking direct limit over $m$ and applying the snake lemma, we
get that $\psi=\varinjlim_m \psi_m$
is surjective and $\Ker \psi$ is a quotient
of $(T_{\ell} H^{2-i}_\rc(U,\widehat \cC))^* $. Since each
$_{\ell^m} H^{2-i}_\rc(U,\widehat \cC)$ is finite,
the $\ell$-adic Tate module $T_{\ell} H^{2-i}_\rc(U,\widehat \cC)$
is profinite and torsion-free, which implies that
the dual $(T_{\ell} H^{2-i}_\rc(U,\widehat \cC))^*$
is divisible.
For $U \neq X$ and $i=1$, the group $H^1_\rc(U,\widehat \cC)$
is of finite type by Proposition~\ref{finityp}\,\eqref{finitypa}, so its
$\ell$-adic Tate-module is zero and $\psi$ has trivial kernel.
The argument for $\psi'$ is similar, using the exact commutative diagram
\begin{equation} \label{finidiag2}
\begin{array}{c}
\xymatrix@C=4mm@R=8mm{
0 \ar[r]& H^{-i}_\rc(U,\widehat \cC)/\ell^m \ar[r]\ar[d]& H^{-i}_\rc(U, \widehat\cC \otimes^\LL\ZZ/\ell^m) \ar[r]\ar[d]&{}_{\ell^m} H^{1-i}_\rc(U,\widehat \cC) \ar[r]\ar[d]^{\psi'_m}& 0\\
0 \ar[r]&(_{\ell^m} H^{2+i}(U,\cC))^* \ar[r]& H^{2+i}(U,
\cC \otimes^\LL\ZZ/\ell^m)^* \ar[r]& (H^{1+i}(U,\cC) /\ell^m)^* \ar[r]& 0.
}
\end{array}
\end{equation}
Besides, for $i=-2$, the Tate module
of $H^{2+i}(U,C)=H^0(U,\mathcal C)$ is trivial \hbox{because}
$H^0(U,\mathcal C)$ is a finitely generated abelian group
(Proposition~\ref{finityp}\,\eqref{finitypb}), which gives that~$\psi'$ has trivial
kernel.
\item
There is an exact commutative diagram of discrete
abelian groups (observe that the second line is obtained by
dualizing an exact sequence of profinite groups):
\begin{equation} \label{finidiag3}
\begin{array}{c}
\xymatrix@C=4mm@R=8mm{
0 \ar[r]& H^i(U,\widehat \cC)/\ell^m \ar[r]\ar[d]& H^i(U,\widehat\cC \otimes^\LL\ZZ/\ell^m) \ar[r]\ar[d]&{}_{\ell^m} H^{i+1}(U,\widehat \cC) \ar[r]\ar[d]^{\varphi_m}& 0\\
0 \ar[r]&(_{\ell^m} H^{2-i}_\rc(U,\cC))^* \ar[r]& H^{1-i}_\rc(U,
\cC \otimes^\LL\ZZ/\ell^m)^* \ar[r]& (H^{1-i}_\rc(U,\cC) /\ell^m)^* \ar[r]& 0.
}
\end{array}
\end{equation}
Since the middle vertical is an isomorphism by Proposition~\ref{avfini}\,\eqref{avfini2}
and $_{\ell^m} (H^{2-i}_\rc(U,\cC))$ is profinite for each $m$
(hence $H^{2-i}_\rc(U,\cC)$ has profinite $\ell$-adic Tate
module), the same argument as in \eqref{avlema} yields that $\varphi$ is surjective with
divisible kernel. If $U=X$ and $i=1$, then $H^{2-i}_\rc(U,\cC)=
H^1(X,\cC)$ is of finite type by Proposition~\ref{finityp}\,\eqref{finitypb},
so it has trivial $\ell$-adic Tate module and $\varphi$ is an isomorphism.
The argument for $\varphi'$ is similar, except that we use the
exact commutative diagram%
\begin{equation} \label{finidiag4}
\begin{array}{c}
\xymatrix@C=4mm@R=8mm{
0 \ar[r]& H^{-i}_\rc(U,\cC)/\ell^m \ar[r]\ar[d]& H^{-i}_\rc(U,
\cC \otimes^\LL\ZZ/\ell^m) \ar[r]\ar[d]&{}_{\ell^m} H^{1-i}_\rc(U,\cC) \ar[r]\ar[d]^{\varphi'_m}& 0\\
0 \ar[r]&(_{\ell^m} H^{i+2}(U,\widehat \cC))^* \ar[r]& H^{i+1}(U,\widehat \cC \otimes^\LL\ZZ/\ell^m)^* \ar[r]& (H^{i+1}(U,\widehat \cC) /\ell^m)^* \ar[r]& 0.
}
\end{array}
\end{equation}
only for $i \not \in \{-1, 0\}$ (for $i\in \{-1, 0\}$ and $U \neq X$,
the diagram would consist of profinite but possibly infinite groups if
$\ell=p$, so
direct limits would not necessarily behave well; in particular, $\ell$-adic
completions involved would not necessarily be profinite). The same
argument as in \eqref{avlema} shows that $\varphi'$ is surjective with divisible
kernel, and this kernel is trivial for $i=-2$ because the finitely generated
abelian group $H^0(U, \widehat \cC)$ (\cf Proposition~\ref{finityp}\,\eqref{finitypa}) has trivial $\ell$-adic Tate module.\qedhere
\end{enumeratea}
\end{proof}
\begin{rema}
For abelian groups $A$, $B$, assertions like ``$A \{\ell\} \to
(B^{(\ell)}) ^*$ is surjective with divisible kernel'' can be rephrased
as follows: the pairing $A \{\ell\} \times B^{(\ell)} \to \QQ/\ZZ$
has trivial right kernel and divisible left kernel.
\end{rema}
The following theorem extends the function field case of
\cite[Th.\,II.4.6]{MilADT}. (which corresponds to $\cC=\cT$ or
$\cC=\cT[1]$, where $\cT$ is a torus).
\skpt
\begin{theo} \label{refin2}
\begin{enumeratea}
\item\label{refin2a}
The pairing \eqref{leftpairing}
induces a perfect duality between the discrete torsion group
$H^3_\rc(U,\widehat \cC)$ and the finite-type $\widehat \ZZ$-module
$H^{-1}(U,\cC)_{\wedge}$, \resp between
the discrete torsion group
$H^2_\rc(U,\widehat \cC)$ and the finite-type $\widehat \ZZ$-module
$H^0(U,\cC)_{\wedge}$.
\item\label{refin2b}
Assume $U \neq X$. The pairing \eqref{leftpairing}
induces a perfect duality between the discrete torsion group
$H^1(U,\cC)$
and the finite-type $\widehat \ZZ$-module
$H^1_\rc(U,\widehat \cC)_{\wedge}$, \resp between
the discrete torsion group
$H^2(U,\cC)$ and the finite-type $\widehat \ZZ$-module
$H^0_\rc(U,\widehat \cC)_{\wedge}$.
\end{enumeratea}
\end{theo}
\skpt
\begin{proof}
\begin{enumeratea}
\item
Let $\ell$ be a prime number. Then the map $\psi'$
of Lemma~\ref{avlem}\,\eqref{avlema} is an isomorphism for $i=-2$,
which yields the first point (recall that $H^3_\rc(U,\widehat \cC)$
and $H^2_\rc(U,\widehat \cC)$ are torsion of cofinite type
by Proposition~\ref{finivanish1}; also $H^{-1}(U,\cC)$ and $H^0(U,\cC)$
are finitely generated by Proposition~\ref{finityp}).
In the case $U=X$,
the second point is a duality between $H^2(X,\widehat \cC)$
and $H^0(X,C)_{\wedge}$, which follows from Lemma~\ref{avlem}\,\eqref{avlemb}
in the case $i=1$.
Now assume $U \neq X$ and let $\cT$ be a $U$-torus.
By the first point applied
to $\mathcal C=\mathcal T [1]$,
the group $H^3_\rc(U,\widehat \cT)$ is dual to
$H^0(U,\mathcal T)_{\wedge}$. By Lemma~\ref{avlem}\,\eqref{avlema} with $i=-1$
and $\mathcal C=\mathcal T [1]$, the finite group $H^2_\rc(U,\widehat \cT)$
(\cf Lemma~\ref{h1lem}\,\eqref{h1lemc}
is dual to the finite group $H^1(U,T)$ (\cf Lemma~\ref{fini1}\,\eqref{fini1a}: indeed, a finite group coincides
with its $\ell$-adic completion and doesn't contain a non trivial
divisible subgroup.
There is a commutative diagram with exact lines (observe that the
second line is obtained by applying the $\ell$-completion functor
to an exact sequence of finitely generated group, then
dualizing an exact sequence of profinite groups):
{\smaller
\[
\xymatrix@C=2.9mm@R=8mm{
H^2_\rc(U,\widehat \cT_2)\{\ell\} \ar[r]\ar[d]^{f_1}& H^2_\rc(U,\widehat\cT_2)\{\ell\}\ar[r]\ar[d]^{f_2}& H^2_\rc(U,\widehat \cC)\{\ell\} \ar[r]\ar[d]^{h}& H^3_\rc(U,\widehat\cT_2)\{\ell\}\ar[r]\ar[d]^{g_1}& H^3_\rc(U,\widehat \cT_1)\{\ell\}\ar[d]^{g_2}\\
(H^1(U,{\mathcal T_2})^{(\ell)})^* \ar[r]& (H^1(U,
{\mathcal T_1})^{(\ell)})^* \ar[r]& (H^0(U,\cC)^{(\ell)})^*
\ar[r]& (H^0(U,{\mathcal T_2})^{(\ell)})^* \ar[r]& (H^0(U,{\mathcal T_1})^{(\ell)})^*\!.
}
\]}
Now $h$ is an isomorphism by the five-lemma, whence the result.
\item
Consider diagram \eqref{finidiag1} for $i=0$.
By \eqref{refin2a}, the left vertical map is an isomorphism
and by Proposition~\ref{avfini}\,\eqref{avfini1},
the middle vertical map is an isomorphism, hence
$\psi_m$ is an isomorphism from $_{\ell^m} H^1(U, \cC)$
to $(H^1_\rc(U,\widehat \cC)/\ell^m)^*$. Taking direct limit over $m$, then
direct sum over all prime $\ell$, yields the duality between the torsion
group of cofinite type (\cf Proposition~\ref{finivanish1})
$H^1(U, \cC)$ and the finite type $\widehat \ZZ$-module
(\cf Proposition~\ref{finityp}) $H^1_\rc(U,\widehat \cC)_{\wedge}$.
Lemma~\ref{avlem}\,\eqref{avlema} for $i=1$ yields
that for $U \neq X$, the map
$\psi$ an isomorphism, which immediately gives the duality between
the torsion group of finite type (\cf Proposition~\ref{finivanish1})
$H^2(U,\cC)$ and the finite type $\widehat \ZZ$-module (\cf Proposition~\ref{finityp}) $H^0_\rc(U, \widehat \cC)_{\wedge}$.\qedhere
\end{enumeratea}
\end{proof}
\begin{rema}
In the case $U=X$, the first assertion of Theorem~\ref{refin2}\,\eqref{refin2b} should be replaced by a duality between
$H^1(X,\widehat \cC)$ and $H^1(X, \cC)_{\wedge}$ (see
Theorem~\ref{refin1}\,\eqref{refin1b} below in the case $U=X$). The second assertion
(duality
between $H^2(X,\cC)$ and $H^0(X, \widehat \cC)_{\wedge}$) actually still
holds, \cf Theorem~\ref{refin1}\,\eqref{refin1a}.
\end{rema}
The following duality theorem has the same flavor as \cite[Th~II.4.6\,(b)]{MilADT} (but one should be careful that in the number field case,
the case $r=3$ of the latter does not hold in general, see also
Remark~\ref{cdn2}).
\skpt
\begin{theo} \label{refin1}
\begin{enumeratea}
\item\label{refin1a}
The pairing \eqref{rightpairing}
induces a perfect duality between the discrete torsion group
$H^3_\rc(U,\mathcal C)$ and the finite-type $\widehat \ZZ$-module
$H^{-1}(U,\widehat \cC)_{\wedge}$, \resp between
the discrete torsion group
$H^2_\rc(U,\mathcal C)$ and the finite-type $\widehat \ZZ$-module
$H^0(U,\widehat \cC)_{\wedge}$.
\item\label{refin1b}
The pairing \eqref{rightpairing}
induces a perfect duality between the discrete torsion group
$H^1(U,\widehat \cC)$ and the profinite
group $H^1_\rc(U,\mathcal C)_{\wedge}$, \resp between
the discrete torsion group
$H^2(U,\widehat \cC)$ and the profinite
group $H^0_\rc(U,\mathcal C)_{\wedge}$.
\end{enumeratea}
\end{theo}
\skpt
\begin{proof}
\begin{enumeratea}
\item
Let $\ell$ be any prime number. The map $\varphi'$ of
Lemma~\ref{avlem}\,\eqref{avlemb} is an isomorphism for $i=-2$, which yields
the first point (Proposition~\ref{avfini}\,\eqref{avfini2} yields that
$H^3_\rc(U,\cC)$ and $H^2_\rc(U,\cC)$ are torsion groups of cofinite type;
Proposition~\ref{finityp} gives that $H^{-1}(U,\widehat \cC)$ and
$H^0(U, \widehat \cC)$ are finitely generated).
There is a commutative diagram with exact lines
{\smaller
\[
\xymatrix@C=2.9mm@R=8mm{
H^2_\rc(U,\mathcal T_1)\{\ell\} \ar[r]\ar[d]^{f_1}& H^2_\rc(U,\mathcal T_2)\{\ell\}\ar[r]\ar[d]^{f_2}& H^2_\rc(U,\mathcal C)\{\ell\} \ar[r]\ar[d]^{h}& H^3_\rc(U,\mathcal T_1)\{\ell\}\ar[r]\ar[d]^{g_1}& H^3_\rc(U,\mathcal T_2)\{\ell\}\ar[d]^{g_2}\\
(H^1(U,\widehat {\mathcal T_1})^{(\ell)})^* \ar[r]& (H^1(U,\widehat
{\mathcal T_2})^{(\ell)})^* \ar[r]& (H^0(U,\widehat \cC)^{(\ell)})^*\ar[r]& (H^0(U,\widehat {\mathcal T_1})^{(\ell)})^* \ar[r]& (H^0(U,\widehat {\mathcal T_2})^{(\ell)})^*\!.
}
\]}
The maps $g_1$ and $g_2$ are isomorphisms by the first point
applied to
$\mathcal C=\mathcal T_1$, $\mathcal C=\mathcal T_2$. The maps
$f_1$ and $f_2$ are isomorphisms by Lemma~\ref{avlem}\,\eqref{avlemb} applied
to the same complexes (map $\varphi$ in the case $i=-1$): indeed, for a $U$-torus $\mathcal T$, the groups
$H^1(U,\widehat \cT)$
and $H^2_\rc(U,\cT)$ are finite
(Lemma~\ref{h1lem}\,\eqref{h1lema} and \eqref{h1lemb}, hence they coincide with their
$\ell$-adic completions and do not contain a non trivial divisible
subgroup.
Therefore, $h$ is an isomorphism by the five-lemma, whence the second
point.
\item
Consider diagram \eqref{finidiag3} for $i=0$. By \eqref{refin1a}, the left vertical map is an isomorphism
and the middle vertical map is an isomorphism by
Proposition~\ref{avfini}\,\eqref{avfini1}, hence
$\varphi_m$ is an isomorphism from $_{\ell^m} H^1(U, \widehat \cC)$
to $(H^1_\rc(U,\mathcal C)/\ell^m)^*$. Taking direct limit over $m$, then
direct sum over all prime $\ell$, yields the duality between
$H^1(U, \widehat \cC)$ (which is torsion by
Proposition~\ref{finivanish2}, but not necessarily of cofinite
type, \cf Remark~\ref{nocofini}) and $H^1_\rc(U,\mathcal C)_{\wedge}$.
Now consider diagram \eqref{finidiag3} for $i=1$. By the previous duality,
the left vertical map induces an isomorphism between
$H^1(U, \widehat \cC)/\ell^m$ and $(_{\ell^m} (H^1_\rc(U,\cC)_{\wedge}))^*$.
Since $H^1_\rc(U,\cC)$ is in the class $\mathcal E$ (that is:
it is the product of a finite type group by a profinite
group) by Proposition~\ref{injectcompl},
the $\ell^m$-torsion of $H^1_\rc(U,\cC)$ and of
$H^1_\rc(U,\cC)_{\wedge}$ coincide, hence the left vertical map is
actually an isomorphism and the right vertical map $\psi_m$ is an
isomorphism as well (the middle vertical map
is an isomorphism by Proposition~\ref{avfini}\,\eqref{avfini2}).
Taking direct limit and direct sum over
all prime $\ell$, we get
the duality between the torsion group (\cf Proposition~\ref{finivanish2})
$H^2(U,\widehat \cC)$ and
the profinite group $H^0_\rc(U,\cC)_{\wedge}$.\qedhere
\end{enumeratea}
\end{proof}
\begin{prop} \label{duald1}
The pairing \eqref{leftpairing} for $r=1$
induces a perfect pairing of finite groups
\begin{equation} \label{d1pairing}
D^1(U, \mathcal C) \times D^1(U,\widehat \cC) \to \QQ/\ZZ.
\end{equation}
\end{prop}
\begin{proof} Fix a prime number $\ell$.
There is a commutative diagram:
\begin{equation} \label{diaglocglob}
\begin{array}{c}
\xymatrix{
0 \ar[r]& D^1(U,\mathcal C)\{\ell\} \ar[r]& H^1(U,\mathcal C)\{\ell\} \ar[r]\ar[d]^{\psi}&\bigoplus_{v \not \in U} H^1(K_v,C)\{\ell\}\ar[d]^{\beta}\\
0 \ar[r]&(D^1(U,\widehat \cC) ^{(\ell)})^* \ar[r]&
(H^1_\rc(U, \widehat \cC) ^{(\ell)})^* \ar[r]& (\bigoplus_{v \not \in U}H^0(K_v,\widehat C)^{(\ell)})^*.
}
\end{array}
\end{equation}
The first line is exact by definition of $D^1(U,\mathcal C)$.
The sequence
\[
\bigoplus_{v \not \in U} H^0(K_v,\widehat C) \to
H^1_\rc(U, \widehat \cC) \to D^1(U,\widehat \cC) \to 0
\]
is also exact by definition of $D^1(U,\widehat \cC)$.
Using Lemma~\ref{exactcomp} and the fact that the
$\ell$-adic completion functor $^{(\ell)}$ commutes
with finite direct sums, the sequence
\[
\bigoplus_{v \not \in U} H^0(K_v,\widehat C)^{(\ell)} \to
H^1_\rc(U, \widehat \cC)^{(\ell)} \to
D^1(U,\widehat \cC)^{(\ell)} \to 0
\]
of profinite groups is exact as well, and its dual sequence (which is the
second line of the diagram) remains exact.
The commutative diagram \eqref{diaglocglob}
defines a map
\[
\theta: D^1(U,\mathcal C)\{\ell\} \to
(D^1(U,\widehat \cC) ^{(\ell)})^*.
\] We observe that
by \cite[Th.\,3.1]{demphd} (which is the local duality theorem),
the map~$\beta$ is an isomorphism,
and we also know by Theorem~\ref{refin2}
that $\psi$ is an isomorphism.
By diagram chasing $\theta$ is an isomorphism.
Since this holds for every
prime $\ell$ (including $\ell=p$), the proposition is proved, the finiteness
of $D^1(U,\mathcal C)$ and $D^1(U,\widehat \cC)$ being known by
Proposition~\ref{finityp}\,\eqref{finitypc}.
\end{proof}
\begin{rema}
Of course, the pairing \eqref{d1pairing} can also be defined
via the pairing \eqref{rightpairing}.
\end{rema}
\begin{lem} \label{d2lem}
Assume $U \neq X$. Then
$D^2(U,\mathcal C)$ and $D^0(U, \widehat \cC)$ are finite.
\end{lem}
\begin{proof} Using the exact triangle \eqref{devistm} and the fact that
$\cok \rho:=\mathcal T$ is a torus, we know that
$D^2(U,\mathcal T)$ is finite and is sufficient to show that
$H^3(U,\ker \rho)$ is finite to get the finiteness of $D^2(U,\mathcal C)$.
But $\ker \rho$ is a group of multiplicative
type, so there is an exact sequence
\[
0 \to \mathcal T_1 \to \ker \rho \to \cF \to 0,
\]
where $\cF$ is a finite group of multiplicative type and
$\mathcal T_1$ is a torus.
Since $H^3(U,\mathcal T_1)=0$ by Proposition~\ref{finivanish1}\,\eqref{finivanish1a} and
$H^3(U,\cF)=0$ (\cf Remark~\ref{fini2};
it is dual to $H^0_\rc(U,\widehat \cF)$,
which is zero because $U \neq X$), the group $H^3(U,\ker \rho)$
is actually zero.
The group $D^0(U,\widehat {\ker \rho})$ is trivial thanks to the
assumption $U \neq X$. Thus the exact triangle \eqref{devistmbis}
shows that $D^0(U,\widehat \cC)$ is finite because
so is $H^1(U,\widehat \cT)$ (Lemma~\ref{h1lem}\,\eqref{h1lema}).
\end{proof}
\begin{lem} \label{d0lem}
Assume $U \neq X$. Then the groups $D^0(U,\cC)$ and $D^2(U,\widehat \cC)$
are finite.
\end{lem}
\begin{proof} For a $U$-torus $\cT$, we have $D^0(U,\cT)=0$ because $U \neq X$.
For a $U$-group of multiplicative type $\mathcal M$, we also know
(Remark~\ref{fini2}) that $H^1(U,\mathcal M)$ is finite, whence
the finiteness of $D^0(U,\cC)$ via the
exact triangle \eqref{devistm}.
Exact triangle \eqref{devistmbis} and the vanishing of $H^3(U, \widehat \cT)$
for a $U$-torus $\cT$ (Lemma~\ref{h1lem}\,\eqref{h1lemd}) imply that $D^2(U,\widehat \cT)$
injects into $D^2(U, \widehat {\mathcal M})$, so it only remains to show
that the latter is finite. We show that $H^2_\rc(U,\widehat
{\mathcal M})$ is finite. By dévissage it is sufficient to prove this
when $M$ is a finite group of multiplicative type and when $M$ is
a torus. The first case follows from Lemma~\ref{fini1}\,\eqref{fini1b} and the second one
from Lemma~\ref{h1lem}\,\eqref{h1lemc}.
\end{proof}
\begin{prop} \label{duald2}
The pairing \eqref{leftpairing} for $r=2$
induces a perfect pairing of finite groups
\begin{equation} \label{d2pairing}
D^2(U, \mathcal C) \times D^0(U,\widehat \cC) \to \QQ/\ZZ.
\end{equation}
\end{prop}
\begin{proof} The argument is exactly the same as in the proof of
Proposition~\ref{duald1}, using now the commutative diagram with
exact lines:
\begin{equation} \label{diaglocglob2}
\begin{array}{c}
\xymatrix{
0 \ar[r]& D^2(U,\mathcal C)\{\ell\} \ar[r]& H^2(U,\mathcal C)\{\ell\} \ar[r]\ar[d]&\bigoplus_{v \not \in U} H^2(K_v,C)\{\ell\}\ar[d]\\
0 \ar[r]& (D^0(U,\widehat \cC) ^{(\ell)})^* \ar[r]&
(H^0_\rc(U, \widehat \cC) ^{(\ell)})^* \ar[r]& (\bigoplus_{v \not \in U}H^{-1}(K_v,\widehat C)^{(\ell)})^*.
}
\end{array}
\end{equation}
Indeed the right vertical map is an isomorphism by \cite[Th.\,3.1]{demphd}
and the middle vertical map is an isomorphism as well by
Theorem~\ref{refin2}\,\eqref{refin2b}. It remains to apply Lemma~\ref{d2lem}.
\end{proof}
\begin{prop} \label{duald0}
The pairing \eqref{rightpairing} for $r=0$
induces a perfect pairing of finite groups
\begin{equation} \label{d0pairing}
D^0(U, \mathcal C) \times D^2(U,\widehat \cC) \to \QQ/\ZZ.
\end{equation}
\end{prop}
\begin{proof} Again the argument is the same as in
Proposition~\ref{duald1}, using this time the commutative diagram with
exact lines:
\begin{equation} \label{diaglocglob0}
\begin{array}{c}
\xymatrix{
0 \ar[r]& D^2(U,\widehat C)\{\ell\} \ar[r]& H^2(U,\widehat C)\{\ell\} \ar[r]\ar[d]&\bigoplus_{v \not \in U} H^2(K_v,\widehat C)\{\ell\} \ar[d]\\
0 \ar[r]& (D^0(U,\cC) ^{(\ell)})^* \ar[r]&
(H^0_\rc(U, \cC) ^{(\ell)})^* \ar[r]& (\bigoplus_{v \not \in U}
H^{-1}(K_v,C)^{(\ell)})^*.
}
\end{array}
\end{equation}
The right vertical map is an isomorphism by \cite[Th.\,3.1]{demphd}
(recall that by Proposition~\ref{injectcompl}, the groups
$H^{-1}(K_v,C)_{\wedge}$ and $H^{-1}(K_v,C)^{\wedge}$ coincide),
and the middle vertical map is an isomorphism as well by
Theorem~\ref{refin1}\,\eqref{refin1b}; Lemma~\ref{d0lem} then yields the result.
\end{proof}
\begin{rema} \label{cdn2}
Again there are analogous results over a number field:
\begin{itemize}
\item Proposition~\ref{avfini}\,\eqref{avfini1} holds except that for $n$ even,
the vanishing statements for $i \geq 2$ do not hold any more
if $\Omega_{\RR} \neq \emptyset$. In Proposition~\ref{avfini}\,\eqref{avfini2},
all groups involved are finite, but the vanishing statements
for $i \leq -2$ are in general false if $n$ is even and
$\Omega_{\RR} \neq \emptyset$.
\item In Proposition~\ref{finivanish1} and Proposition~\ref{finivanish2},
the vanishing statements must be repla\-ced by finiteness statements
if $\Omega_{\RR} \neq \emptyset$ for the following groups:
$H^i(U,\cC)$ for $i \geq 4$, $H^i_\rc(U,\widehat \cC)$ for $i \leq -2$,
$H^i(U,\widehat \cC)$ for $i \geq 4$, $H^i_\rc(U,\cC)$ for $i \leq -2$.
The groups $H^3(U,\cC)$, $H^{-1}_\rc(U,\widehat \cC)$, and
$H^{-1}_\rc(U,C)$ are still finite if $U \neq X$ (\resp zero if
$U \neq X$ and $\Omega_{\RR} = \emptyset$).
Also, the group $H^1(U,\cC)$ is finite even if $U=X$ and
the finiteness assertions in Proposition~\ref{finivanish2}\,\eqref{finivanish2a}
hold without any condition on $i$.
Finally,
\emph{the vanishing of $H^3(U,\widehat \cC)$ does not hold any more}
(see Remark~\ref{cdn1} about $H^3(U, \widehat \cT)$) even
for $\Omega_{\RR}=\emptyset$.
\item Lemma~\ref{avlem} is unchanged, except that the restriction
$U \neq X$ can be removed in~\eqref{avlema} for $i=1$.
\item Theorem~\ref{refin2} is unchanged (which gives a more precise statement
than \cite[Th.\,4.3]{demphd}) except that the assumption
$U \neq X$ can be removed in \eqref{refin2b}. Theorem~\ref{refin1}\,\eqref{refin1a} is still true,
as is the first assertion of Theorem~\ref{refin1}\,\eqref{refin1b}, but
\emph{not the second assertion of Theorem~\ref{refin1}\,\eqref{refin1b}}: the
pairing $H^2(U,\widehat \cC) \{\ell\} \times H^0_\rc(U,\cC)^{(\ell)}$
has trivial right kernel and divisible left kernel, but
for triviality of the left kernel we need $\ell$ invertible
on $U$ and Leopoldt's conjecture.
\item Proposition~\ref{duald1} is unchanged (this removes the condition $\ell
\in \cO_U^*$ in \cite[Cor.\,4.7]{demphd}).
Lemma~\ref{d2lem} also holds
(in the proof, the groups $H^3(U,\mathcal T_1)$ and
$H^0_\rc(U,\widehat \cF)$ might be only finite if
$\Omega_{\RR} \neq \emptyset$, but this does not affect the result),
as does Proposition~\ref{duald2} (the assumption $\ker \rho$ finite
made in \cite[Lem.\,5.13]{demphd} is not necessary).
The first part of Lemma~\ref{d0lem} still holds,
but \emph{not its second part} because in general the $\ell$-primary part
of $H^3(U,\widehat \cT)$ is infinite if $\ell$ is not invertible
on $U$ (and even for $\ell \in \cO_U^*$, the finiteness of
$H^3(U,\widehat \cT)\{\ell\}$ relies on Leopoldt's conjecture).
Similarly \emph{Proposition~\ref{duald0} does not hold any more
in general}, we only get that the pairing \eqref{d0pairing}
has trivial left kernel and
divisible right kernel (see also \cite[\S5.4]{demphd} for
a variant).
\end{itemize}
\end{rema}
\section{Poitou-Tate exact sequences} \label{three}
Let $C=[T_1 \to T_2]$ be a complex of $K$-tori with dual
$\widehat C=[\widehat T_2 \to \widehat T_1]$. We can choose a non empty
Zariski open subset $U_0$ of $X$ such that $C$ extends to a complex
$\mathcal C=[\cT_1 \To{\rho}\cT_2]$
of $U_0$-tori with dual
$\widehat \cC$. For every integer $i$ and every $K$-group
scheme (or bounded complex of $K$-group schemes)
$M$ (\eg $M=T$, $M=\widehat T$), define
\[
\Sha^i(M):=\Ker [H^i(K,M) \to \tprod_{v \in X^{(1)}} H^i(K_v,M)].
\]
\begin{lem} \label{shad1}
There exists a non empty Zariski open subset $U_1 \subset U_0$
such that for every Zariski open subset $V \subset U_1$:
\begin{enumeratea}
\item\label{shad1a}
For $i \in \{1, 2\}$,
the restriction map $r_{U_1,V}: H^i(U_1,\mathcal C) \to H^i(V,\mathcal C)$
induces isomorphisms
\[
D^i(U_1,\mathcal C) \cong D^i(V,\mathcal C) \cong \Sha^i(C).
\]
\item\label{shad1b}
For $r \in \{0, 1\}$,
the canonical map $H^r(V, \widehat \cC) \to H^r(K,
{\widehat \cC})$ is injective and identifies $D^r(V,\widehat \cC)$
with $\Sha^r(\widehat C)$.
\end{enumeratea}
\end{lem}
\begin{proof} We can deal with the two properties \eqref{shad1a} and \eqref{shad1b} separately
(up to taking the intersections of the various provided $U_1$).
\begin{enumeratea}
\item
Let us start with arbitrary non empty Zariski open subsets
$V \subset U \subset U_0$. Take $i \in \{1,2\}$.
For all $v \in U$, we have $H^i(\cO_v,\mathcal C)=0$ by
Lemma~\ref{vanishlocal}, which implies that
the image of $D^i(U,\mathcal C)$ by $r_{U,V}$ is contained in
$D^i(V,\mathcal C)$. The induced map $D^i(U,\mathcal C) \to
D^i(V,\mathcal C)$ is surjective thanks to the compatibility of
the covariant map $H^i_\rc(V,\mathcal C) \to H^i_\rc(U,\mathcal C)$
with $r_{U,V}$ (\cite[Prop.\,2.1\,(3)]{DemH}). Since all $D^i(U,\mathcal C)$
are finite by Proposition~\ref{finityp}\,\eqref{finitypc} and Lemma~\ref{d2lem},
the decreasing sequence
of positive integers $\# D^i(U,\mathcal C)$ (when $U$ becomes
smaller and smaller) must stabilize for some $U=U_1$. We get
an isomorphism from $D^i(U_1,\mathcal C)$ to $D^i(V,\mathcal C)$
for all $V \subset U_1$. Since
$H^i(K,C)$ is the direct limit over $V$ of the $H^i(V,\mathcal C)$, we
get an injective map \hbox{$u: D^i(U_1,\mathcal C) \to H^i(K,C)$}. As
$D^i(U_1,\mathcal C)$ is the same as $D^i(V,\mathcal C)$ for every
$V \subset U_1$, the image of $u$ is contained in $\Sha^i(C)$ (because
its restriction to $H^i(K_v,C)$ is zero for all $v \not \in V$ and~$V$ can be taken arbitrarily small). Conversely, every element
of $\Sha^i(C)$ can be lifted to an $a\!\in\!H^i(V, \mathcal C)$ for some
$V$, and by definition \hbox{$a\!\in\!D^i(V,\mathcal C)\!=\!D^i(U_1,\mathcal C)$}, so
the image of $u$ contains $\Sha^i(C)$.
\item
Let $V \subset U_0$ be an arbitrary non empty Zariski
open subset. Let $r \in \{0, 1\}$.
The injectivity
of $H^r(V, \widehat \cC) \to H^r(K,\widehat C)$ has been
proved in Proposition~\ref{finityp}\,\eqref{finitypa}.
Identifying
now $D^r(V,\widehat \cC)$ with a subgroup of
$H^r(K,\widehat C)$, we get (again using the maps
$H^r(V,\widehat \cC) \to H^r(U,\widehat \cC)$ for
$V \subset U \subset U_0$) a decreasing sequence of
finite subgroups (when $V$ becomes smaller and smaller), which
stabilizes for some $U_1$. Since $D^r(U_1,\widehat \cC)$ is
also $D^r(V,\widehat \cC)$ for every $V \subset U_1$, we
have $D^r(U_1,\widehat \cC) \subset \Sha^r(\widehat C)$.
On the other hand, every element of $\Sha^r(\widehat C)$ comes from
$H^r(V,\widehat \cC)$ for some $V \subset U_1$, and it is then
automatically in $D^r(V,\widehat \cC)=D^r(U_1,\widehat \cC)$
because it is everywhere locally trivial.\qedhere
\end{enumeratea}
\end{proof}
\begin{theo} \label{sha12theo}
There are perfect pairing of finite groups
\begin{align*}
\Sha^1(C) \times \Sha^1(\widehat C) &\to \QQ/\ZZ.
\\
\Sha^2(C) \times \Sha^0(\widehat C) &\to \QQ/\ZZ.
\end{align*}
\end{theo}
\begin{proof} This follows immediately from Lemma~\ref{shad1} and
Proposition~\ref{duald1} (\resp Pro\-po\-sition~\ref{duald2}) applied to $U_1$.
\end{proof}
\begin{lem} \label{injecth0}
There exists a non empty Zariski open subset $U_1$ of $U_0$ such that
for every non empty Zariski open subset $V$ of $U_1$:
\begin{itemize}
\item
the restriction map
$H^0(V,\cC) \to H^0(K,C)$ is injective.
\item
For all non empty Zariski open subsets $W \subset V$, the canonical map
\[
j_{W,V}: H^2_\rc(W,\widehat \cC) \to H^2_\rc(V,\widehat \cC)
\] is surjective and
the image of $D^2(V,\widehat \cC)$ by the restriction map
\[
r_{V,W}: H^2(V,\widehat \cC) \to H^2(W,\widehat \cC)
\] is a subgroup of
$D^2(W,\widehat \cC)$.
\end{itemize}
\end{lem}
\begin{proof} Let $U \subset U_0$ be a non empty Zariski open subset.
By the exact triangle \eqref{devistm}, there is a commutative
diagram with exact lines
\[
\xymatrix{
0 \ar[r]& H^1(U,\mathcal M) \ar[r]\ar[d]& H^0(U,\cC) \ar[r]\ar[d]& H^0(U,\cT_0)\ar[d]\\
0 \ar[r]& H^1(K,M) \ar[r]& H^0(K,C) \ar[r]& H^0(K,T_0),
}
\]
where $\mathcal M$ is a $U$-group of multiplicative type with generic
fiber $M$ and $\cT_0$ is a $U$-torus.
Since the right vertical map is clearly injective, it is sufficient to
prove the injectivity of the left vertical map for $U$ small enough.
We can write $\mathcal M$ as an extension
\[
0 \to \cT \to \mathcal M \to \cF \to 0
\]
of a finite $U$-group of multiplicative type $\cF$ by a
$U$-torus $\cT$. This yields a commutative diagram with exact lines
\[
\xymatrix{
0 \ar[r]& H^0(U,\cF) \ar[r]\ar[d]& H^1(U,\cT) \ar[r]\ar[d]& H^1(U,\mathcal M) \ar[r]\ar[d]&H^1(U,\cF)\\
0 \ar[r]& H^0(K,F) \ar[r]& H^1(K,T) \ar[r]& H^1(K,M) \ar[r]&H^1(K,F).
}
\]
Since $\cF$ is finite (hence proper) over $U$, the left vertical
map is an isomorphism and the right vertical map is injective.
It is therefore sufficient to prove that for a $U$\nobreakdash-torus~$\cT$, the
restriction map $H^1(U,\cT) \to H^1(K,T)$ is injective for $U$ sufficiently
small.
Set $N_U=\ker [H^1(U,\cT) \to H^1(K,T)]$. For every Zariski open
subset $V \to U$, the restriction map
$H^1(U,\cT)\!\to\!H^1(V,\cT)$ induces a homomorphism \hbox{$i_{U,V}: N_U\!\to\!N_V$}.
By~Lemma~\ref{uvlem},
this homomorphism is surjective. Lemma~\ref{fini1} implies that
the group~$N_V$ is finite, and the decreasing sequence of positive
\hbox{integers}~$(\# N_V)_{V \subset U_0}$ must stabilize for some
$V=U_1 \subset U_0$. Then the maps $i_{U_1,V}$ for $V \subset U_1$
are isomorphisms,
which implies (passing to the limit) that the restriction map
$N_{U_1} \to H^1(K,T)$ is injective. By definition of $N_{U_1}$, this
means that $N_{U_1}=0$, hence $N_V=0$ for every $V \subset U_1$. This gives
the first point.
For $W \subset V \subset U_1$,
the restriction map $H^0(V,\cC) \to H^0(W,\cC)$ is injective
because so is its composition with $H^0(W,\cC) \to H^0(K,\cC)$. As
$H^0(V,\cC)$ and $H^0(W,\cC)$ are finitely generated by
Proposition~\ref{finityp}\,\eqref{finitypb}, the induced map
$H^0(V,\cC)_{\wedge} \to H^0(W,\cC)_{\wedge}$ is still injective.
By Theorem~\ref{refin2}, the dual map $H^2_\rc(W,\widehat \cC) \to
H^2_\rc(V,\widehat \cC)$ is surjective. Now the compatibility
of $r_{V,W}$ with $j_{W,V}$ (\cite[Prop.\,2.1\,(c)]{DemH} gives that
$r_{V,W} (D^2(V,\widehat \cC)) \subset D^2(W,\widehat \cC)$.
\end{proof}
\begin{theo} \label{sha0theo}
There is a perfect pairing of finite groups
\[
\Sha^0(C) \times \Sha^2(\widehat C) \to \QQ/\ZZ.
\]
\end{theo}
\begin{proof} As in the proof of Lemma~\ref{shad1}, Lemma~\ref{injecth0} and
Lemma~\ref{d0lem} imply that for a sufficiently small Zariski open subset
$U \subset U_0$, we have $\Sha^0(\cC)=D^0(U,\cC)$ and $\Sha^2(\widehat \cC) \cong
D^2(U,\widehat \cC)$. Now apply Proposition~\ref{duald0}.
\end{proof}
For each integer $i$, denote by $\prod^{\prime}_{v \in X^{(1)}}
H^i(K_v,C)$ (\resp $\prod^{\prime}_{v \in X^{(1)}}
H^i(K_v,C)_{\wedge}$)
the restricted product of the $H^i(K_v,C)$ (\resp of the $H^i(K_v,C)_{\wedge}$)
with respect
to the $H^i_{\nr}(K_v,C)$ (\resp to the image of $H^1(\cO_v,\cC)$ in
$H^i(K_v,C)_{\wedge}$). The same notation stands for $\widehat C$.
The groups $\prod^{\prime}_{v \in X^{(1)}} H^i(K_v,C)$ and
$\prod^{\prime}_{v \in X^{(1)}} H^i(K_v,\widehat C)$ are equipped with their
restricted product topology (associated to the topology previously
defined on the $H^i(K_v,C)$ and $H^i(K_v,\widehat C)$). All groups
$H^i(K,C)$ (\resp $H^i(K,\widehat C)$) are equipped with the discrete
topology.
\begin{lem} \label{discretlem}
Let $i$ be an integer. Then the image of $H^i(K,C)$
in $\prod^{\prime}_{v \in X^{(1)}} H^i(K_v,C)$ is discrete for the subspace
topology. The same holds if $C$ is replaced by $\widehat C$.
\end{lem}
\begin{proof} As the local fields $K_v$ are of strict cohomological dimension $2$,
the statement is obvious except for $-1 \leq i \leq 2$.
Fix a Zariski open subset $U \subset U_0$ with $U \neq X$.
All groups $H^i(K_v,\widehat C)$ are discrete, so the subgroup
\[
E:=\tprod_{v \not \in U} \{0\} \times \tprod_{v \in U}
H^i_{\nr}(K_v, \widehat C)
\]
is open in $\prod^{\prime}_{v \in X^{(1)}}
H^i(K_v,\widehat C)$. Let $I$ be the image of
$H^i(K,\widehat C)$ in $\prod^{\prime}_{v \in X^{(1)}} H^i(K_v,\widehat C)$.
Every element of $H^1(K,\widehat C)$ comes from
$H^1(V, \widehat \cC)$ for some $V \subset U$, hence by
Lemma~\ref{uvlem}, there is a surjection $D^i(U,\widehat \cC) \to I \cap E$.
Since all groups $D^i(U,\widehat \cC)$ are finite by
Proposition~\ref{finityp}\,\eqref{finitypc}, Lemma~\ref{d2lem} and Lemma~\ref{d0lem},
this implies that $I \cap E$ is finite, hence $I$ is discrete.
The same argument shows that the image $J$ of $H^i(K,C)$
in $\prod^{\prime}_{v \in X^{(1)}} H^i(K_v,C)$ is discrete for $i \geq 1$.
For $i \in \{-1, 0\}$,
this is an immediate consequence of Lemma~\ref{closedimage} (again combined
with Lemma~\ref{uvlem}).
\end{proof}
\pagebreak[2]
\begin{lem} \label{ptstart}
Let $U \subset U_0$ be a non empty Zariski open subset with $U \neq X$.
\begin{enumeratea}
\item\label{ptstarta}
There are exact sequences\vspace*{-3pt}
\begin{gather*}
H^0(U,\cC) \to \tprod_{v \not \in U} H^0(K_v,C) \times \tprod_{v \in U}
H^0_{\nr}(K_v,C) \to H^1(K,\widehat C)^*.
\\
0 \to
H^{-1}(U,\cC) \to \tprod_{v \not \in U} H^{-1}(K_v,C) \times \tprod_{v \in U}
H^{-1}_{\nr}(K_v,C) \to H^2(K,\widehat C)^*.
\end{gather*}
\item\label{ptstartb}
There are exact sequences\vspace*{-3pt}
\begin{gather*}
H^2(U,\widehat \cC) \to \tprod_{v \not \in U} H^2(K_v,\widehat C)
\times \tprod_{v \in U}
H^2_{\nr}(K_v,\widehat C) \to H^{-1}(K,C)^* \to 0.
\\
H^{1}(U,\widehat \cC) \to \tprod_{v \not \in U} H^{1}(K_v,\widehat C)
\times \tprod_{v \in U} H^{1}_{\nr}(K_v,\widehat C) \to H^0(K,C)^* \to
D^2(U,\widehat C).\vspace*{-3pt}
\end{gather*}
\end{enumeratea}
\end{lem}
\skpt
\begin{proof}
\begin{enumeratea}
\item
Let $V \subset U$ be a non empty Zariski open subset. Let
$i \in \{-1, 0\}$. By Lemma~\ref{uvlem},
we have an exact sequence\vspace*{-1pt}
\[
H^i(U,\cC) \to \tprod_{v \not \in U} H^i(K_v,C) \times
\tprod_{v \in U\setminus V} H^i_{\nr}(K_v,C) \to H^{i+1}_\rc(V,\cC).\vspace*{-3pt}
\]
By Proposition~\ref{injectcompl}, the map $H^{i+1}_\rc(V,\cC) \to
H^{i+1}_\rc(V,\cC)_{\wedge}$
is injective, thus by Theorem~\ref{refin1} we get an exact sequence\vspace*{-1pt}
\[
H^i(U,\cC) \to \tprod_{v \not \in U} H^i(K_v,C) \times
\tprod_{v \in U\setminus V} H^i_{\nr}(K_v,C) \to H^{1-i}(V,\widehat \cC)^*,\vspace*{-3pt}
\]
where $H^{1-i}(V,\widehat \cC)$ is a discrete torsion group.
Besides, the kernel of the first map
is a subgroup of $D^i(U,\cC)$, hence it is finite for $i=0$
by Lemma~\ref{d0lem}. This kernel is also obviously zero for $i=-1$ as soon
as $V \neq U$.
This implies that the inverse limit of this exact sequence
(when $V$ runs over all non empty Zariski open subsets of $U$) remains exact,
which yields the result.
\item
We apply again Lemma~\ref{uvlem} and observe that for $i \in \{1, 2\}$:
\begin{itemize}
\item
We have $H^{i+1}_\rc(V,\widehat \cC) \simeq
(H^{1-i}(V,\cC)_{\wedge})^* \simeq H^{1-i}(V,\cC)^*$ by Theorem~\ref{refin2},
because the discrete finitely generated (\cf Proposition~\ref{finityp}\,\eqref{finitypb})
group $H^{1-i}(V,\cC)$ and its completion have same dual.
\item
The groups $D^i(U,\widehat \cC)$ are finite (Lemma~\ref{d0lem} and
Proposition~\ref{finityp}\,\eqref{finitypc}).
\end{itemize}
Now the same method as in \eqref{ptstarta} gives the exactness of\vspace*{-1pt}
\[
H^i(U,\widehat \cC) \to
\tprod_{v \not \in U} H^i(K_v,\widehat C) \times \tprod_{v \in U}
H^i_{\nr}(K_v,\widehat C) \to H^{1-i}(K,C)^*.\vspace*{-3pt}
\]
Besides, by \cite[Prop.\,2.1]{DemH} there is a commutative diagram
with exact lines:\vspace*{-3pt}
\[
\xymatrix@C=5mm@R=4mm{
&& D^{i+1}(U,\widehat \cC) \\
\tprod_{v \in U\setminus V} H^i_{\nr}(K_v,\widehat C) \ar[r]&
H^{i+1}_\rc(V,\widehat \cC) \ar[r]& H^{i+1}_\rc(U,\widehat \cC)\ar[u]\\
& \tprod_{v \not \in V} H^{i}(K_v,\widehat C)\ar[u]& \ar[l]\tprod_{v \not \in U} H^{i}(K_v,\widehat C).\ar[u]
}
\]
The right column is also exact by definition of $D^{i+1}(U,\widehat \cC)$.
By diagram chasing, this yields an exact sequence
\begin{equation} \label{vsequ}
\tprod_{v \not \in U} H^i(K_v,\widehat C) \times \tprod_{v \in U\setminus V}
H^i_{\nr}(K_v,\widehat C) \To{s_V} H^{i+1}_\rc(V,\widehat \cC)
\to D^{i+1}(U,\widehat C).
\end{equation}
As seen before, the kernel of $s_V$ is the image of $H^i(U,\widehat \cC)$, which
implies that for $W \subset V$, the transition map
$\ker s_W \to \ker s_V$ is surjective. The map
\[
\tprod_{v \not \in U} H^i(K_v,\widehat C) \times \tprod_{v \in U\setminus W}
H^i_{\nr}(K_v,\widehat C) \to \tprod_{v \not \in U} H^i(K_v,\widehat C)
\times \tprod_{v \in U\setminus V} H^i_{\nr}(K_v,\widehat C)
\]
is also obviously surjective. Thus taking projective limit
over $V$ in \eqref{vsequ} gives an exact sequence
\[
\tprod_{v \not \in U} H^i(K_v,\widehat C) \times \tprod_{v \in U}
H^i_{\nr}(K_v,\widehat C) \to H^{1-i}(K,C)^* \to
D^{i+1}(U,\widehat C)
\]
(indeed, recall that $H^{i+1}_\rc(V,\widehat \cC) \cong H^{1-i}(V,C)^*$).
It remains to observe that for $i=2$, we have $D^3(U,\widehat \cC) \subset
H^3(U,\widehat \cC)=0$ (Proposition~\ref{finivanish2}).\qedhere
\end{enumeratea}
\end{proof}
\begin{theo}[Poitou-Tate I] \label{spt1}
In the sequence
\begin{equation} \label{ptdiag1}
\begin{array}{c}
\xymatrix@=5mm{
0 \ar[r]& H^{-1}(K,C) \ar[r]& \prod^{\prime}_{v \in X^{(1)}} H^{-1}(K_v,C) \ar[r]&H^2(K,\widehat C)^*\ar[d]\\
& H^1(K,\widehat C)^* \ar[d]&\ar[l] \prod^{\prime}_{v \in X^{(1)}} H^{0}(K_v,C)&\ar[l] H^0(K,C)\\
& H^1(K,C) \ar[r]& \bigoplus_{v \in X^{(1)}} H^1(K_v,C) \ar[r]& H^0(K,\widehat C)^*\ar[d]\\
0 &\ar[l] H^{-1}(K,\widehat C)^* &\ar[l] \bigoplus_{v \in X^{(1)}}H^2(K_v,C)&\ar[l] H^2(K,C)
}
\end{array}
\end{equation}
every sequence of three consecutive terms is exact, except the two ones
respectively finishing with $H^0(K,C)$ and $H^1(K,C)$, which must be
replaced with the following ``completed'' exact sequences:\vspace*{-3pt}
\begin{gather*}
\tprod^{\prime}_{v \in X^{(1)}} H^{-1}(K_v,C)_{\wedge} \to H^2(K,\widehat C)^*
\to H^0(K,C).
\\
\tprod^{\prime}_{v \in X^{(1)}} H^{0}(K_v,C)_{\wedge} \to H^1(K,\widehat C)^*
\to H^1(K,C).
\end{gather*}
\end{theo}
\begin{proof} Let $U \subset U_0$ be a non empty Zariski open subset with
$U \neq X$.
First take $i \in \{1, 2\}$. By \eqref{suppcomp}, there is an exact sequence\vspace*{-3pt}
\[
H^i(U,\cC) \to \bigoplus_{v \not \in U} H^i(K_v,C) \to
H^{i+1}_\rc(U,\cC)
\]
and for $i=2$ the last map is surjective because $H^3(U,\cC)=0$
by Proposition~\ref{finivanish1}\,\eqref{finivanish1a}.
By Theorem~\ref{refin2} and Proposition~\ref{injectcompl},
we have\vspace*{-3pt}
\[
H^{i+1}_\rc(U,\cC) \cong
H^{1-i}(U,\widehat \cC)^* \cong H^{1-i}(K,\widehat C)^*,
\]
whence (by Lemma~\ref{vanishlocal}) for every non empty Zariski
open subset $V \subset U$, a commutative diagram with exact lines\vspace*{-3pt}
\[
\xymatrix@R=6mm{
H^i(U,\cC) \ar[r]\ar[d]& \bigoplus_{v \not \in U} H^i(K_v,C) \ar[r]\ar[d]^j&H^{1-i}(K,\widehat C)^*\ar@{=}[d]\\
H^i(V,\cC) \ar[r]& \bigoplus_{v \not \in V} H^i(K_v,C) \ar[r]&
H^{1-i}(K,\widehat C)^*,
}
\]
where $j$ is obtained by putting $0$ at the missing places (and the right
horizontal maps are surjective for $i=2$).
Therefore, taking direct limit over $U$ in the first line of this diagram
gives that the last two lines of \eqref{ptdiag1}
are exact.
The exactness of the first two lines of \eqref{ptdiag1} comes from
Lemma~\ref{ptstart} after taking again direct limit over $U$.
It remains to prove the exactness of the following three sequences:\vspace*{-3pt}
\begin{gather*}
\tprod^{\prime}_{v \in X^{(1)}} H^{-1}(K_v,C)_{\wedge} \to H^2(K,\widehat C)^*
\to \Sha^0(C) \to 0.
\\
\tprod^{\prime}_{v \in X^{(1)}} H^{0}(K_v,C)_{\wedge} \to H^1(K,\widehat C)^*
\to \Sha^1(C) \to 0.
\\
\bigoplus_{v \in X^{(1)}} H^{1}(K_v,C) \to H^0(K,\widehat C)^*
\to \Sha^2(C) \to 0.
\end{gather*}
We observe that for $0 \leq i \leq 2$, the following
sequence is exact:\vspace*{-3pt}
\[
0 \to \Sha^i(\widehat C) \to H^i(K,\widehat C) \To{p_i}
\tprod^{\prime}_{v \in X^{(1)}} H^i(K_v,\widehat C).
\]
Set $A_i:=\Im p_i$; we get exact sequences
(the maps being strict by Lemma~\ref{discretlem}) of
Hausdorff, totally disconnected groups
\begin{gather*}
0 \to \Sha^i(\widehat C) \to H^i(K,\widehat C) \to A_i \to 0.
\\
0 \to A_i \to \tprod^{\prime}_{v \in X^{(1)}} H^i(K_v,\widehat C),
\end{gather*}
where $A_i$ is equipped with the discrete topology. By \cite[Lem.\,2.4]{hss} (where the groups are assumed to be locally compact, but the proof shows
that it sufficient to assume
that they have a basis of neighborhoods of zero consisting
of open subgroups; this is the case for all groups considered here),
the duals of these exact sequences are also exact.
Recall that for $i \in \{-1, 0\}$, the group
$H^i(K_v,C)_{\wedge}=\varprojlim_{n >0} (H^i(K_v,C)/n)$ is also the
completion $H^i(K_v,C)^{\wedge}$ of $H^i(K_v,C)$ with respect to the
open subgroups of finite index.
By \cite[Th.\,3.1 \& 3.3]{demphd}, the dual of
$\prod^{\prime}_{v \in X^{(1)}} H^i(K_v,\widehat C)$ is
$\prod^{\prime}_{v \in X^{(1)}} H^{1-i}(K_v,C)_{\wedge}$
for $1 \leq i \leq 2$, and
the dual of the group
$\prod^{\prime}_{v \in X^{(1)}} H^0(K_v,\widehat C)=\tprod_{v \in X^{(1)}}
H^0(K_v,\widehat C)$ (\cf Remark~\ref{localisom}) is $\bigoplus_{v \in X^{(1)}}
H^1(K_v,C)$. By Theorems~\ref{sha0theo} and \ref{sha12theo},
the dual of the finite group $\Sha^i(\widehat C)$ is
$\Sha^{2-i}(C)$. This proves the result.
\end{proof}
\begin{theo}[Poitou-Tate II] \label{spt2}
In the sequence
\begin{equation} \label{ptdiag2}
\begin{array}{c}
\xymatrix@=5mm{
0 \ar[r]& H^{-1}(K,\widehat C) \ar[r]& \tprod_{v \in X^{(1)}}
H^{-1}(K_v,\widehat C) \ar[r]& H^2(K,C)^*\ar[d]\\
&H^1(K,C)^* \ar[d]&\ar[l] \tprod_{v \in X^{(1)}} H^{0}(K_v,\widehat C)
&\ar[l] H^0(K,\widehat C)\\
&H^1(K,\widehat C) \ar[r]& \prod^{\prime}_{v \in X^{(1)}} H^1(K_v,\widehat C) \ar[r]&H^0(K,C)^*\ar[d]\\
0 &\ar[l] H^{-1}(K,C)^* &\ar[l] \prod^{\prime}_{v \in X^{(1)}} H^2(K_v,\widehat C)&\ar[l] H^2(K,\widehat C)
}
\end{array}
\end{equation}
every sequence of three consecutive terms is exact, except the two ones
respectively finishing with $H^0(K,\widehat C)$ and $H^1(K,\widehat C)$,
which must be
replaced with the following completed exact sequences:
\begin{gather*}
\tprod_{v \in X^{(1)}} H^{-1}(K_v,\widehat C)_{\wedge} \to H^2(K,C)^*
\to H^0(K,\widehat C).
\\
\tprod_{v \in X^{(1)}} H^{0}(K_v,\widehat C)_{\wedge}
\to H^1(K,C)^*
\to H^1(K,\widehat C).
\end{gather*}
\end{theo}
\begin{proof} This is very similar to the proof of Theorem~\ref{spt1}.
Let $U \subset U_0$ be a non empty open subset with $U \neq X$.
For $i \in \{-1, 0\}$, \eqref{suppcomp} and Proposition~\ref{finityp}\,\eqref{finitypa}
give an exact sequence\vspace*{-3pt}\enlargethispage{.5\baselineskip}%
\[
H^i(K,\widehat C) \to \tprod_{v \not \in U} H^i(K_v,\widehat C) \to
H^{i+1}_\rc(U,\widehat C),
\]
such that the kernel of the first map is zero for $i=-1$, and this kernel
is finite
(by~Lemma~\ref{d2lem}) for $i=0$. Applying Theorem~\ref{refin2} and
taking projective limit over~$U$, we obtain that the first two lines of
\eqref{ptdiag2} are exact.
Taking direct limit over $U$ in the exact sequences of Lemma~\ref{ptstart}\,\eqref{ptstartb} yields the exactness of the last line and of the sequence\vspace*{-3pt}
\[
H^1(K,\widehat C) \to \tprod^{\prime}_{v \in X^{(1)}} H^1(K_v,\widehat C) \to
H^0(K,C)^* \to \Sha^2(\widehat C).
\]
because $\Sha^2(\widehat C) \cong \varinjlim_U D^2(U,\widehat \cC)$
(\cf Theorem~\ref{sha0theo}).
Finally, dualizing the exact sequence of discrete groups\vspace*{-3pt}
\[
0 \to \Sha^i(C) \to H^i(K,C) \to
\bigoplus_{v \in X^{(1)}} H^i(K_v,C)
\]
for $i \in \{1, 2\}$
gives the missing pieces of Theorem~\ref{spt2}, thanks to
Theorem~\ref{sha12theo} and \cite[Th.\,3.1 \& 3.3]{demphd}.
\end{proof}
\begin{rema} \label{variantors}
As the groups $H^1(K,\widehat C)$ and $H^2(K,\widehat C)$ are torsion,
it is also possible to replace the last two lines of \eqref{ptdiag2} by
the following exact sequences\vspace*{-3pt}
\begin{multline} \label{vari1}
0 \to \Sha^1(\widehat C) \to H^1(K,\widehat C) \to \Bigl(\tprod^{\prime}_{v \in X^{(1)}}H^1(K_v,\widehat C)\Bigr)_\tors\\
\to (H^0(K,C)_{\wedge}) ^* \to\Sha^2(\widehat C) \to 0.
\end{multline}
\vspace*{-20pt}
\begin{multline} \label{vari2}
0 \to \Sha^2(\widehat C) \to H^2(K,\widehat C) \to \Bigl(\tprod^{\prime}_{v \in X^{(1)}}H^2(K_v,\widehat C) \Bigl)_\tors\\
\to (H^{-1}(K,C)_{\wedge}) ^* \to 0.
\end{multline}
Indeed for $i \in \{-1,0\}$, the dual of $H^i(K,C)_{\wedge}=
\varprojlim_{n >0} (H^i(K,C)/n)$ (equipped with the inverse limit topology) is
\[
\varinjlim_{n >0} \, (H^i(K,C)/n)^*=\varinjlim_{n >0} {}_n H^i(K,C)^*=
(H^i(K,C)^*)_\tors,
\]
which gives that \eqref{vari1} and \eqref{vari2} are exact,
except that we don't have the surjectivity of
$(H^0(K,C)_{\wedge}) ^* \to \Sha^2(\widehat C)$ yet. To see the latter,
we first observe that for a $K$-torus~$T$, the subgroup of divisible
elements in $H^0(K,T)$ is trivial (indeed, we may assume that~$T$ is split
and this is so for $K^*$ because $K$ is a global field); then the same
property holds by dévissage (using \eqref{devistm}) for $H^0(K,C)$ because
for a group of multiplicative type~$M$, the group $H^1(K,M)$ is of finite
exponent via Hilbert 90. Therefore, the canonical map $H^0(K,C) \to
H^0(K,C)_{\wedge}$ is injective, whence
an injection $\Sha^0(C) \hto\nobreak H^0(K,C)_{\wedge}$, whose dual
$(H^0(K,C)_{\wedge})^* \to \Sha^2(\widehat C)$ (\cf Theorem~\ref{sha0theo})
is surjective, the group $\Sha^0(C)$ being finite and $H^0(K,C)_{\wedge}$
having a basis of neighborhoods of zero
consisting of open subgroups (\cf \cite[Lem.\,2.4]{hss}).
\end{rema}
We can now prove the following variant of Theorem~\ref{spt1}:
\begin{theo}[Poitou-Tate, I$'$] \label{spt1bis}
There is an exact sequence\vspace*{-3pt}
\begin{equation} \label{ptdiag1bis}
\begin{array}{c}
\xymatrix@=4mm{
0 \ar[r]& H^{-1}(K,C)_{\wedge} \ar[r]& \bigl[\prod^{\prime}_{v \in X^{(1)}}
H^{-1}(K_v,C)\bigr]_{\wedge} \ar[r]&
H^2(K,\widehat C)^*\ar[d]\\
& H^1(K,\widehat C)^* \ar[d]&\ar[l] \bigl[\prod^{\prime}_{v \in X^{(1)}} H^{0}(K_v,C)\bigr]_{\wedge}&
\ar[l] H^0(K,C)_{\wedge}\\
& H^1(K,C) \ar[r]& \bigoplus_{v \in X^{(1)}} H^1(K_v,C) \ar[r]& H^0(K,\widehat C)^*\ar[d]\\
0 &\ar[l] H^{-1}(K,\widehat C)^* &\ar[l] \bigoplus_{v \in X^{(1)}} H^2(K_v,C)&\ar[l] H^2(K,C)
}
\end{array}
\end{equation}
\end{theo}
\begin{proof} Dualizing \eqref{vari1} and \eqref{vari2}
yields the two exact sequences
\begin{multline*}
0 \to \Sha^0(C) \to H^0(K,C)_{\wedge} \to [{\tprod}'_{v \in X^{(1)}} H^0(K_v,C)]_{\wedge}\\
\shoveright{\to H^1(K,\widehat C)^* \to \Sha^1(C) \to 0,}
\\
0 \to H^{-1}(K,C)_{\wedge} \to \bigl[{\tprod}'_{v \in X^{(1)}} H^{-1}(K_v,C)]_{\wedge}
\to H^2(K,\widehat C)^* \to \Sha^0(C) \to 0.
\end{multline*}
The other parts of the sequence follow from Theorem~\ref{spt1}.
\end{proof}
\begin{rema}
A subtle point here is that for $i \in \{-1,0\}$,
there is a canonical injective map (which is induced by the isomorphism
$\tprod_v H^i(K_v,C)_{\wedge} \cong [\tprod_v H^i(K_v,C)]_{\wedge}$):
\[
{\tprod}'_{v \in X^{(1)}} H^i(K_v,C)_{\wedge} \hto
\bigl[{\tprod}'_{v \in X^{(1)}} H^i(K_v,C)\bigr]_{\wedge},
\]
but this map is not surjective in general. For instance if $i=0$ and $C=\G$,
we have $H^0(K_v,C) \cong \cO_v^* \times \ZZ$;
as $\bigoplus_{v \in X^{(1)}} \widehat \ZZ$ is smaller than
$[\bigoplus_{v \in X^{(1)}} \ZZ]_{\wedge}$, the aforementioned map is not
surjective. Observe that the natural map
$H^i(K,C) \to \prod'_{v \in X^{(1)}} H^i(K_v,C)_{\wedge}$ \emph{does not}
in general extend to $H^i(K,C)_{\wedge}$, it is only defined on the
bidual $H^i(K,C)^{**}$, which is smaller than $H^i(K,C)_{\wedge}$.
\end{rema}
\begin{rema} \label{II'}
Dualizing the exact sequence
\begin{multline*}
0 \to \Sha^i(C) \to H^i(K,C) \to
\bigoplus_{v \in X^{(1)}} H^i(K_v,C)\\[-8pt]
\to H^{1-i}(K,\widehat C)^*
\to \Sha^{i+1}(K,C) \to 0
\end{multline*}
for $i \in \{1, 2\}$ also yields an exact Poitou-Tate sequence II$'$, which
is the same as \eqref{ptdiag2} except that for $r \in \{-1, 0\}$, the
group $H^r(K,\widehat C)$ (\resp $\tprod_{v \in X^{(1)}} H^r(K_v,\widehat C)$)
has to be replaced
by $H^r(K,\widehat C)_{\wedge}$ (\resp by $\bigl(\tprod_{v \in X^{(1)}} H^r(K_v,\widehat C)\bigr)_{\wedge}=
\tprod_{v \in X^{(1)}} H^r(K_v,\widehat C)_{\wedge}$).
\end{rema}
\begin{rema} \label{cdn3}
If we replace the function field $K$ by a number field, some
results of this section still hold and some of them have to be
modified. Namely:
\begin{itemize}
\item Theorem~\ref{sha12theo} is unchanged (with the same proof), see
also \cite[Th.\,5.7 \& 5.12]{demphd} (in the latter the
assumption $\ker \rho$ finite is unnecessary).
\item Lemma~\ref{injecth0} still holds. Therefore, Theorem~\ref{sha0theo}
is also true: indeed, since the pairing \eqref{d0pairing} has divisible
right kernel and trivial left kernel, taking the direct
limit over $U$ (and using
the facts that the sequence of finite groups $D^0(U,\cC)$ stabilizes
for $U$ sufficiently small) yields a pairing $\Sha^0(C) \times
\Sha^2(\widehat C)$ with divisible right kernel and
trivial left kernel. But it is known that $\Sha^2(\widehat C)$ is finite
(see \cite[Proof of Th.\,5.14]{demphd}), whence the result (which extends
\cite[Th.\,5.23]{demphd}).
Actually the image of $H^2_\rc(U,\widehat \cC)$ into $H^2(K,\widehat C)$ is
finite by dévissage thanks to exact triangle \eqref{devistmbis}:
indeed, $H^3(K,\widehat T) \cong \bigoplus_{v \in \Omega_{\RR}}
H^3(K_v,\widehat T)$ is finite for a torus $T$, and
$H^2_\rc(U,\widehat {\mathcal M})$
is also finite for a group of multiplicative type
$\mathcal M$ because we already saw (\cf Remark~\ref{cdn1}
and Lemma~\ref{h1lem}\,\eqref{h1lemc} that
this holds when $\mathcal M$ is a torus or a finite group.
\item In Lemma~\ref{discretlem}, one has to restrict to $i \geq 1$ for
the assertion about $C$. The result about $\widehat C$ holds for
an arbitrary $i$ (although the group $D^2(U,\widehat \cC)$ might be infinite,
we just saw that
its image in $H^2(K,\widehat C)$ is finite, which is sufficient).
\item Lemma~\ref{ptstart}\,\eqref{ptstarta} is not valid any more (one has to complete
the first two terms in the exact sequences); the second exact sequence
of \eqref{ptstartb} still holds (same proof),
as does the first one except for the surjectivity of the last map,
which must be replaced by the exact sequence\vspace*{-3pt}\enlargethispage{\baselineskip}%
\[
\tprod_{v \not \in U} H^2(K_v,\widehat C) \times \tprod_{v \in U}
H^2_{\nr}(K_v,\widehat C) \to H^{-1}(K,C)^* \to D^3(U,\widehat \cC) \to 0
\]
because we lack the vanishing of $D^3(U,\widehat \cC)$.
Also, since $D^2(U,\widehat \cC)$ is in general infinite,
the proof of the exactness of\vspace*{-3pt}
\[
H^2(U,\widehat \cC) \to \tprod_{v \not \in U} H^2(K_v,\widehat C)
\times \tprod_{v \in U}
H^2_{\nr}(K_v,\widehat C) \to H^{-1}(K,C)^*
\]
is a little bit more complicated (using exact triangle \eqref{devistmbis}
one reduces
to the case when~$\cC$ is quasi-isomorphic to $\mathcal M[1]$, where
$\mathcal M$ is a group of multiplicative type; then one proceeds as in
Lemma~\ref{ptstart}\,\eqref{ptstartb}, the group $D^2(U,\widehat {\mathcal M})$ being finite
because $H^2_\rc(U,\widehat {\mathcal M})$ is finite).
\item By the previous observations, the end of sequence \eqref{ptdiag1}
starting
with $H^1(K,\widehat C)^*\!\to H^1(K,C) \to\cdots$ remains exact.
Theorem~\ref{spt2} is valid with one single slight complication in the
proof: we do not know in general that $D^3(U,\widehat \cC)=0$,
but the direct limit over $U$ of the $D^3(U,\widehat \cC)$ is
$\Sha^3(\widehat C)$, which is zero. Theorem~\ref{spt1bis} is therefore also
unchanged, which extends \cite[Th.\,6.1 \& 6.3]{demphd}.
\end{itemize}
\end{rema}
\begin{rema}
In the case of one single torus $T$ with module of characters
$\widehat T$, some of our results of Section~\ref{two} and \ref{three}
can be deduced from similar theorems on $1$-motives proved by
González-Avilés (\cite[Th.\,6.6]{gonz1}) and González-Avilés/Tan
(\cite[Th.\,3.11]{gonz2}).\vspace*{-3pt}
\end{rema}
\backmatter
\bibliographystyle{jepalpha+eid}
\bibliography{demarche-harari}
\end{document}