My question is: is $\mathbb{Z}$ discrete in $\widehat{\mathbb{Z}}$?
Here, by saying $\widehat{\mathbb{Z}}$, I mean $\widehat{\mathbb{Z}} = \varprojlim_{n: n \mid m} \mathbb{Z}/n\mathbb{Z}$, as the absolute Galois group of the finite field $\mathbb{F}_p$, with the Krull topology (i.e. the profinite topology). Then $\mathbb{Z}$ has a subspace topology induced from $\widehat{\mathbb{Z}}$. Then is this subspace topology on $\mathbb{Z}$ a discrete topology?
I first thought it was a purely topological problem, i.e. in a compact Hausdorff topological space $X$, there cannot be any dense discrete subspace $A$ (i.e. subspace with induced topology being discrete) with infinitely many subspace. But later I came up with a counterexample: Take $X = \{0\} \cup \{1/n: n \in \mathbb{N}\}$ and $A = \{1/n: n \in \mathbb{N}\}$.
So I got stuck here. I hope to see that $\mathbb{Z}$ is not discrete in $\widehat{\mathbb{Z}}$.
Something that may be not related to the question: Actually I come up with this question when understanding the topology on the Weil group $W_F$, where $F$ is a local number field like $\mathbb{Q}_p$.
I have found the same question here: Is Z discrete in its profinite completion?, but my counterexample above makes me doubt if there are flaws in the above linked posts.
Thank you all for commenting and answering!
More generally, if $G$ is any (abstract) group, then we have a profinite completion $G \to \widehat{G}=\varprojlim G/N$. (The limit being taken over all normal subgroups of finite index). We can take the initial toplogy on $G$ with respect to this map, since $\widehat{G}$ is profinite and hence has a profinite topology. The topology induced on $G$ by this has the following open sets: a set is open $U$ if and only for every point $x$, there exists a normal subgroup $N$ of finite index in $G$ such that $xN \subset U$. If we apply this to $\Bbb Z$ or any infinite group, then we see that the singleton $\{e\}$ is not open, because the trivial subgroup does not have finite index. Hence the induced topology on $G$ is not discrete if $G$ is infinite.
A different way to see that $\Bbb Z$ is not discrete in $\widehat{\Bbb Z}$ is indicated in the comments.