The Pontryagin dual of a discrete abelian group is compact 
Suppose $G$ is a discrete abelian group. Show that $\hat{G}$ is compact. 

This exercise is the converse of this question: The Pontryagin dual of a compact abelian group is discrete An example of this statement (and its converse) is the relation between the discrete abelian group $\mathbb{Z}$ and the circle group $S^1$. 
I did this exercise (as I did in the mentioned post above) when I read an introduction to Fourier analysis on locally compact abelian groups. I got stuck in the middle and a search in google only returned the statement in nLab: "In general, the dual of a discrete group is a compact group and conversely." I also did not find the statement on this site.
I eventually figured it out and put it as an answer below. Any alternative approach/reference will be welcome.

There are slightly different ways of defining the Pontryagin dual. The one I have in mind for doing the exercise is as follows.


*

*A map $\chi:G\to S^1$ is called a character of $G$ if it is a group homomorphism:
$$
\chi(g_1g_2)  = \chi(g_1)\chi(g_2),\quad \ g_1,g_2\in G\;,
$$
and it is continuous. Here $S^1$ donotes the circle group. (Again, there are different ways defining the circle group. I take it as the set $\{z\in\mathbb{C}:|z|=1\}$ together with multiplication of complex numbers.)

*One can check that the (pointwise) product of two characters is again a character; the set $\hat{G}$ (together with the product) of all characters of $G$ is a group. 

*One introduces a topology on $\hat{G}$ by defining the neighborhoods of a given $\chi_0\in\hat{G}$ as follows. Let $K\subset G$ be a compact set and $\epsilon>0$. Then set the neighborhood
$$
V_{K,\epsilon} = \{\chi \in \hat{G}:\sup_{g\in K}|\chi(g)-\chi_0(g)|<\epsilon\}\;.
$$
So this is essentially the topology of uniform convergence on compact sets. 
 A: $\def\gd{\hat{G}}$
Trying to prove directly by definition of compactness seems "absurd" here: how would you make an argument that any open cover on $\hat{G}$ has a finite subcover? It seems to be equally difficult to check that "Any collection of closed subsets of X with the finite intersection property has nonempty intersection." 
But the compactness of $\gd$ one wants to prove must come from somewhere. Observe that for any $\chi\in\gd$, it is, by definition, a function from $G$ to $S^1$ and $S^1$ is compact. On the other hand, $\gd$ is a set of functions from $G$ to $S^1$ with some extra properties. In other words, it is a subset of the product space $(S^1)^G$, which is compact in the product topology by Tychonoff's theorem.
But "A closed subset of a compact space is compact". So if we can show the following two things, then we are done:


*

*$\gd$ is closed in the product space $(S^1)^G$;

*the compact convergence topology on $\gd$ coincides with the subspace topology on $\gd$ induced from the product space $(S^1)^G$.


The second one follows from the observations that (1) convergence in the product topology is the same as pointwise convergence of functions; (2) compact convergence coincides with pointwise convergence here since $G$ is a discrete space. 
So now the problem reduces to showing that $\gd$ is closed in the product space $(S^1)^G$. There are of course many characterizations of "closed". But some of them are rather difficult to use. For instance, it is difficult to say anything if one wants to show directly that $\gd$ is the complement of an open set in $(S^1)^G$.
On the hand, since $G$ is discrete and every (complex-valued) function on $G$ is continuous, we can rewrite $\gd$ as
$$
\gd = \bigcap_{g_1,g_2\in G}\{f:G\to S^1\mid f(g_1g_2)=f(g_1)f(g_2)\}
$$
So it suffices to show that each set $A:=\{f:G\to S^1\mid f(g_1g_2)=f(g_1)f(g_2)\}$ is closed in $(S^1)^G$. Now the following property useful here:

A subset $A$ of $X$ is closed if and only if, whenever $(x_\alpha)$ is a net with elements in $A$ and limit $x$, then $x$ is in $A$.

Suppose $(\chi_\alpha)$ is a net in $A$, and $\chi_\alpha\to \chi\in (S^1)^G$. This means that $\chi_\alpha(g)\to \chi(g)$ for every $g\in G$. But $\chi_\alpha(g_1g_2) = \chi_\alpha(g_1)\chi_\alpha(g_2)$. So passing the limit in complex numbers, one obtains $\chi(g_1g_2)=\chi(g_1)\chi(g_2)$, i.e., $\chi\in A$.
