Here is the second part of Example $7)$ of Kechris' "Classical Descriptive Set Theory" (pp. $59-60$):
More generally, consider a structure $$\mathcal{A}=(A,(R_i)_{i\in I},(f_j)_{j\in J},(c_k)_{k\in K})$$ (in the sense of model theory) condisting of a set $A$, a family of relation $(R_i)_{i\in I}$, operations $(f_j)_{j\in J}$ and distinguished elements $(c_k)_{k\in K})$ on $A$. Assume $A$ is countably infinite. Let $Aut(\mathcal{A})$ be the group of automorphisms of $\mathcal{A}$. Thinking, without loss of generally, of $A$ as being $\mathbb{N}$, $Aut(\mathcal{A})$ is a closed subgroup of $S(\mathbb{N})$ group of permutations over $\mathbb{N}$.
I don't see how to prove that $Aut(\mathcal{A})$ is closed in $S(\mathbb{N})$.
Thank you in advance for your help.
A permutation is an automorphism when it preserves the interpretations of all the basic relation, function, and constant symbols. But preserving the interpretation of the symbols is the same as not failing to preserve the symbols. So the idea is to check that "for every symbol in the language, for every possible way $\sigma$ could fail to preserve the symbol, $\sigma$ doesn't do that" is a closed condition.
More precisely: for any finite tuples $\overline{a}$ and $\overline{b}$ in $\mathbb{N}^k$, there is an open set $$U(\overline{a},\overline{b}) = \{\sigma\in S(\mathbb{N})\mid \sigma(\overline{a}) = \overline{b}\}.$$ It's complement is a closed set $$C(\overline{a},\overline{b}) = \{\sigma\in S(\mathbb{N})\mid \sigma(\overline{a}) \neq \overline{b}\}.$$
Now the set of automorphisms of the structure $\mathcal{A}$ with domain $\mathbb{N}$ is the intersection of the following closed sets:
More efficiently (but less explicitly), we can show that $\text{Aut}(\mathcal{A})$ is closed in $S(\mathbb{N})$ by showing that its complement is open, i.e. for every $\sigma\in S(\mathbb{N})\setminus \text{Aut}(\mathcal{A})$, $\sigma$ has an open neighborhood contained in $S(\mathbb{N})\setminus \text{Aut}(\mathcal{A})$.
Well, if $\sigma$ fails to be an automorphism, this is already witnessed by some finite tuple $\overline{a}$, in the sense there is some symbol in the language such that $\sigma$ fails to preserve this symbol because it maps $\overline{a}$ to $\overline{b} = \sigma(\overline{a})$. Then any permutation of $\mathbb{N}$ that maps $\overline{a}$ to $\overline{b}$ will fail to be an automorphism, so $U(\overline{a},\overline{b})$ is an open neighborhood of $\sigma$ in $S(\mathbb{N})\setminus \text{Aut}(\mathcal{A})$, as desired.