Let $K$ be a number field, $R$ the ring of integers of $K$,
${\mathbf{A}^f}$ the ring finite adeles of $K$, and ${\widehat{R}}\subset {\mathbf{A}^f}$ the ring of integral adeles.


Let $G$ be an affine group scheme of finite type over $R$ with smooth generic fiber $G\_K$.
Let 
$$c(G)=G({\widehat{R}})\backslash G({\mathbf{A}^f})/G(K)$$ 
denote the pointed set of double cosets of $G$.
If I understand correctly, Yevsey Nisnevich in his [Comptes rendus note of 1984](http://www.cims.nyu.edu/~nisnevic/articles/yncr11.pdf)
claims that there exists an exact sequence of pointed sets
$$
1\to c(G)\to H^1\_{\rm et}({\rm Spec}(R),G)\to H^1(K,G)\times \prod\_{{\mathfrak{p}}\in{\rm Spec}(R)\smallsetminus \{0\} } H^1\_{\rm et}({\rm Spec}(R\_{\mathfrak{p}}),G),
$$ 
where $R\_{\mathfrak{p}}$ denotes the completion of $R$ at the finite place ${\mathfrak{p}}$ of $K$.


**Question.** How can one define the map $c(G)\to H^1\_{\rm et}({\rm Spec}(R),G)$ in this exact sequence?



Group schemes, adeles, double cosets, and étale cohomology
Given an element of $c(G)$, we are looking for an etale $G$-torsor which is trivial when restricted to $\text{Spec}(K)$ and each $\text{Spec}(R\_\mathfrak{p})$, for $\mathfrak{p}$ a finite prime of $R$. Because this $G$-torsor will be trivial over $K$, it will in fact be trivial over some Zariski-open $U$ of $\text{Spec}(R)$, say $U=\text{Spec}(R[1/N])$. Furthermore, for each $\mathfrak{p}$ dividing $N$, this torsor will be trivial on $\text{Spec}(R\_\mathfrak{p})$. 


Summing up (and using fpqc descent), we are looking for a trivial $G$-torsor on $$U':=U\cup \bigcup\_{\mathfrak{p}|N}\text{Spec}(R\_\mathfrak{p})$$ and descent data to $\text{Spec}(R)$. I claim one can extract such descent data from an element of $c(G)$. 


Namely, let's choose a trivialization of our trivial $G$-torsor on $U'$. Now the descent data boils down to choosing elements of $G(\text{Frac}(K\_\mathfrak{p}))$ for each $\mathfrak{p}|N$. Since descent is effective for the cover $U'\to\text{Spec}(R)$, we may harmlessly enlarge $U'$ to $$U''=U\cup \bigcup\_{\mathfrak{p}\in R}\text{Spec}(R\_\mathfrak{p}).$$ Now descent data is given by a choice of element of $G(R\_\mathfrak{p})$ for each $\mathfrak{p}\in U$ and an element of $G(K\_\mathfrak{p})$ for each $\mathfrak{p}|N$. That is, descent data (for this cover, after choosing a trivialization!) is an element of $G(\mathbf{A}^f)$. But changing the trivialization over $U$ (possibly after shrinking $U$) changes this descent data by an element of $G(K)$; changing the trivialization on $\bigcup\_{\mathfrak{p}\in R}\text{Spec}(R\_\mathfrak{p})$ changes the descent data by an element of $G(\hat R)$. Thus the desired double coset space precisely corresponds to fpqc descent data.



> 
> Let me be a bit more explicit, since there's been a question in the comments. Let $$V=\text{Spec}(K)\cup \bigcup\_{\mathfrak{p}\in R} R\_\mathfrak{p}=\varprojlim\_U U\cup \bigcup\_{\mathfrak{p}\in R}\text{Spec}(R\_\mathfrak{p}).$$ The above discussion shows that (1) descent is effective for the cover $V\to \text{Spec}(R)$ and (2) elements of $c(G)$ are in bijection with descent data on a trivialized $G\_V$ torsor over $V$, modulo choice of trivialization. Hence one may associate to an element of $c(G)$ descent data; as descent is effective this gives an actual $G$-torsor on $\text{Spec}(R)$ as desired.
> 
> 
> 


Strictly speaking, we've given a map from the desired double coset space to $H^1\_{\text{fpqc}}(\text{Spec}(R), G)$. We need to argue that in fact the torsor we get is etale-locally trivial. In fact the torsor we've given is clearly trivial over some open set, by construction (namely, choosing a representative of the double coset, there is an open set $U$ consisting of $\mathfrak{p}$ so that the relevant element of $G(K\_\mathfrak{p})$ is in fact in $G(R\_\mathfrak{p})$). So we must argue that in fact our torsor is etale-locally trivial in a neighborhood of the other $\mathfrak{p}$. I don't see why this is true if $G$ doesn't satisfy weak approximation; if it does, we can always make our descent data integral at any given $\mathfrak{p}$ by modifying it by an element of $G(K)$, and then conclude by the previous sentence. But perhaps I'm missing something easy. (See grghxy's comment for the observation that weak approximation is not necessary, b/c of Artin approximation. If weak approximation is satisfied, the map in fact lands in $H^1\_{Zar}(\text{Spec}(R), G)$.)


For more details on this sort of construction, see e.g. [this answer](https://mathoverflow.net/questions/112593/adelic-description-of-moduli-of-g-bundles-on-a-curve). I'm not an expert on this sort of thing, so caveat emptor.


