Solution (source code)

= Solution

The <Ehrenfeucht-Mostowski theorem> says that if a first-order theory $T$ has an infinite model, then for every <total order> $I$ there is a model $M\models T$ generated as the <Skolem hull> of distinct <order-indiscernible sequence>[order indiscernibles] $(a_i)_{i\in I}$, and every order automorphism of $I$ extends to an <automorphism of a first-order structure>[automorphism] of $M$.

Given an infinite cardinal $\kappa$, let $I=\kappa\times\mathbb Q$ with the lexicographic order, viewed as $\kappa$ consecutive copies of the rational order. In each copy independently choose either the identity or a fixed nonidentity order automorphism of $\mathbb Q$. These choices give $2^\kappa$ distinct order automorphisms of $I$.

Apply the theorem to this order. Distinct order automorphisms act differently on the distinct generators $a_i$, so their extensions give an injection into the <automorphism group of a first-order structure> $\operatorname{Aut}(M)$. Therefore $|\operatorname{Aut}(M)|\geq2^\kappa$, proving that $T$ has <models with arbitrarily large automorphism groups>.