Categorical description of the restricted product (Adeles) Background on the Adèles
The Adèles $\mathbb{A}_K$ of a number field or function field $K$ are defined as a restricted product of the complete local fields $K_\nu$, where $\nu$ ranges over all places of $K$. The restricted product is usually defined as the subset of $\prod_\nu K_\nu$ given by
$\mathbb{A}_K := \prod_\nu' K_\nu := \{ (x_\nu)_\nu \in \prod_\nu K_\nu\ |\ \text{ all but finitely many } x_\nu \in \mathcal{O}_\nu\}$
where $\mathcal{O}_\nu$ is the ring of integers in $K_\nu$.
Tensor product description
An alternative description, for the sake of concreteness given for the rationals $K=\mathbb{Q}$ can be made by using the tensor product:
$\mathbb{A}_\mathbb{Q} = \left(\left(\prod_p \mathbb{Z}_p\right) \otimes_\mathbb{Z} \mathbb{Q}\right) \times \mathbb{R}.$
This is the same, because $\mathbb{Z}_p \otimes \mathbb{Q} = \mathbb{Q}_p$ and the tensor product captures the finiteness condition. As there are always only finitely many infinite places, this description can be given for any number field as well (and of course function fields, since they don't have infinite places at all).
The topology on the Adèles
The restricted product comes with a restricted product topology, which is not the subspace topology from the ordinary product (despite its name), but the topology whose subbasis sets are
$V_{\eta,U_\eta} := \{(x_\nu)_\nu \in \prod_\nu K_\nu\ |\ x_\nu \in \mathcal{O}_\nu \text{ for } \nu \neq \eta, \text{ and } x_\eta \in U_\eta\}$
with $\eta$ a place and $U_\eta \subseteq K_\eta$ any open subset.
The subspace topology from the product differs from this by requiring only $x_\nu \in \mathcal{O}_\nu$ for all but finitely many places, which are not fixed uniformly for a subbasis set.
Given a subset $U$ of $\mathbb{A}_K$ which is open in the ordinary subspace topology from the ordinary product, for every place $\nu$ there might be an $x \in U$ such that $x_\nu \notin \mathcal{O}_\nu$. If instead $U$ is open in the restricted product topology, there is a fixed finite set of places $\{\nu_1,...,\nu_m\}$ such that for every $x \in U$ and every other place $\nu \neq \nu_i$ we have $x_\nu \in \mathcal{O}_\nu$.
Nice properties of this topology are: You get again a locally compact group with compact open subgroup $\prod_\nu \mathcal{O}_\nu$ and that the Haar measure on $\mathbb{A}_K$ gives the quotient $\mathbb{A}_K/K$ a finite measure (with $K$ embedded diagonally by the maps $K \to K_\nu$).
The question: how to describe the Adèles categorically?
More specifically, I'd like to understand the restricted topology as well.
The ordinary product is a limit, and as such it carries the initial topology. Any subspace carries the initial topology as well, but this gives the wrong topology, not the restricted product topology but the topology restricted from the product.


*

*Is it impossible to give a categorical description?

*Would it even be useful to have a categorical description?

*Does one have to apply a limit-colimit procedure or might a single limit or colimit suffice?

*There are some similarities with ultraproducts, which are classically not defined in a categorical way, but it is possible. The restricted product is somewhat dual to an ultraproduct. Could that help?

*Is there a good canonical way to topologize the tensor product of topological algebras over a topological ring? Would that solve my problem?

*Which (universal) properties do the Adèles satisfy?



(there was a section with my (non-working) ideas on this, which I removed after the answers came in.)
 A: I was puzzled by this question as well a while ago. Here is a suggestion, which worked for me: 


*

*The product and the co-product of categories are best defined by an universal mapping property.

*The adeles $\mathbb{A}$ are the inductive limit of all $S$-adeles 
$$\mathbb{A}(S) = \mathbb{R} \times \prod\limits_{p \in S} \mathbb{Q}_p \times \prod\limits_{p \notin S} \mathbb{Z}_p$$
for a finite set of places. The universal property is described as follows: If you are given a map 
$$\phi : \mathbb{A} \rightarrow X$$ to some topological space $X$, then there exists for every large enough set $S$ a unique $\phi_S : \mathbb{A}(S)  \rightarrow X$ such that $\phi_S = \phi$ on $\mathbb{A}(S)$. 
Remark: For this to work, it is important that all but finitely many compact subrings ($\mathbb{Z}_p$ in the above context) are actually open subrings, since you have to choose the characteristic functions of this set at the places $p \notin S$ to construct $\phi_S$. So I doubt that the restricted product can be defined in the category of locally compact groups/rings/spaces in such a fashion. On the other hand, the restricted product can be defined for a family of pairs of topological spaces $(A_i \supset B_i)_i$ with almost all $B_i$ are open in $A_i$.
A: First, the references cited by KConrad above are unduly neglected/obscure... while answering the question as it stands.
Also, as Mrc Plm's answer, quite literally the adeles are a colimit of products.
Third, indeed, one can (successfully) abstract the "restricted-product topology" (again, as KConrad notes, not "restricted product-topology", but the other grouping), BUT what is not clear is what the point of that would be, I think. That is, apart from discussion of adeles, ideles, adelizations of reductive groups over global fields, and their repn theory, there are not many examples of naturally-occurring "restricted products". Thus, although, if we persevere, we can abstract the notion, after having done so we do not have revelations about how these things were all around us but merely un-named. :)
That is, the notion of "restricted product" is reasonably perceivable as a bit of a let-down, since it explains little.
I find it an interesting rhetorical question "Do adeles occur in nature?", as opposed to "can we construct/axiomatize" them, or "are they useful?" A simpler analogue is the p-adic integers $\mathbb Z_p$ which, although eminently constructible as a completion of $\mathbb Z$, one could ask why make that metric, ... considering that it takes some thought to verify that it is a metric at all, and, then, why complete? That is, by now, to say that $\mathbb Z_p$ is the (projective) limit of $\mathbb Z/p^n$ is more persuasive to me of the occurring-in-nature aspect.
Similarly, the "solenoids" made by taking limits of $\mathbb R/N\cdot \mathbb Z$ have a limit which is arguably a natural object. When we already have $\mathbb Q_p$ in hand, we can exhibit an action of $\mathbb Q_p$ on this solenoid. Honest investigation of how close we can come to making the genuine product of p-adics act leads to the restriction appearing in the blunt definition of adeles. In various logical sequences, one finds that the solenoid is $\mathbb A/\mathbb Q$. In this setting, the compactness of the quotient is immediate, since (Tychonoff) limits of Hausdorff compacts are compact. 
That is, one can "discover" much of the "restricted product" notion by trying to write the solenoid as a quotient by $\mathbb Q$ of something that has an action of $\mathbb R$ and all the $\mathbb Q_p$'s on it, etc. 
That is, it is possible to give some sense of inevitability to these notions perhaps better than merely giving the definitions.
A: Let $P$ the pullbak (in the topological groups category) of the natural maps $\prod_{\nu\in N} K_\nu\to \prod_\nu K_\nu/\mathcal{O_\nu}$ and  $\coprod_\nu K_\nu/\mathcal{O_\nu}\to \prod_\nu K_\nu/\mathcal{O_\nu}$, then $P$ as set is the restricted product, but has the subspace topology of the product $\prod_\nu K_\nu$. Now $\coprod_\nu K_\nu/\mathcal{O_\nu}$ is the (filtrant) colimit of $(\coprod_{\nu\in F} K_\nu)_{F\subset N finite}$ 
with coproiections $\coprod_{\nu\in F}K_\nu\to \coprod_\nu K_\nu\to \coprod_\nu K_\nu/\mathcal{O_\nu}$.  And by pullback we have that the set $P$ is a (filtrant) colimits $(P_F\to P)_{F\subset N\ finite}$ and $P_F$ is the produt of the $K_\nu\ \nu\in F$ and the $\mathcal{O_\nu},\ \nu\not\in F$, and observe that $P_{F_1}\cap P_{F_2}=P_{F_1\cap F_2}$. Give on $P_F$ the topology inducted by the projection $P_F\to \prod_{\nu\in F} K_\nu$ (the codomain by the product topology). 
If we take the colimit  topology  on $P$ we get the restricted topology: 
If $U$ is open on the colimit topology then each $U\cap P_F$ is open, then is open in the restricted topology (where the family of the $P_F$'s is a open covering), viceversa, let $U$ a unions of a family of $P_F$, is enought show that each $P_F$ is open in the colimit topology, i.e. that the intersection with any $P_{F'}$ is open in $P_{F'}$, but this follow from the observation above (and observe that any $\mathcal{O}\subset K$ is supposed open, see http://modular.math.washington.edu/129/ant/html/node82.html). 
A: Personally I think that the restricted product description should be avoided.  It is best to define $\widehat{\mathbb{Z}}$ to be the inverse limit of the system of all quotients $\mathbb{Z}/n$ (without gratuitously factoring $n$ as a product of primes) and then put $\mathbb{A}=(\mathbb{Q}\otimes\widehat{\mathbb{Z}})\times\mathbb{R}$.  We can topologise this by giving $\mathbb{R}$ the usual topology, and $\mathbb{Q}\otimes\widehat{\mathbb{Z}}$ the topology for which the sets $q\otimes\widehat{\mathbb{Z}}$ form a basis of neighbourhoods of zero.  Now the adeles for any number field $K$ can be defined as $\mathbb{A}\otimes K$.  Any $\mathbb{Q}$-basis for $K$ identifies $\mathbb{A}\otimes K$ with $\mathbb{A}^d$ and thus gives a topology on $\mathbb{A}\otimes K$, which is easily seen to be independent of the choice of basis.  The connection with primes/valuations for $K$ should be a theorem, not a definition.
