1 Introduction

Let \(\mathcal {L}\) be a first-order language, \({\textsf{A}}\) be a collection of \(\mathcal {L}\)-sentences, and \(\mathscr {C}\) be the class of all \(\mathcal {L}\)-structures satisfying \({\textsf{A}}\). On \(\mathscr {C}\), we consider a binary relation \(\sqsubseteq \) interpreted as accessibility: for \(\textbf{M}, \textbf{N}\in \mathscr {C}\), we write \(\textbf{M}\sqsubseteq \textbf{N}\) if \(\textbf{M}\) accesses \(\textbf{N}\). This gives \((\mathscr {C},\sqsubseteq )\) the structure of a Kripke frame whose Kripke models we can study. The natural analysis of such structures is in terms of their modal logic or their structure modal logic (precise definitions of these notions will be given in § 2).

In this paper, we shall consider the class \(\mathscr {A}\) of abelian groups and the accessibility relation of being (isomorphic to) a subgroup (i.e., \(\textbf{A}\sqsubseteq \textbf{B}\) if and only if \(\textbf{A}\le \textbf{B}\)). We prove that the modal logic of this structure is the well-known modal logic \(\mathsf {S4.2}\) (Main Theorem 3.1).

Background and related work. Modal logics of classes of structures were originally studied in the context of multiverses of set theory where the modal \(\Box \)-operator was interpreted as “in all forcing extensions”, “in all ground models”, or “in all inner models” to yield the modal logic of forcing, the modal logic of grounds, and the modal logic of inner models, respectively [10, 11, 15]. The work that started this line of investigation was the proof of Hamkins and the third author that the modal logic of forcing is \(\mathsf {S4.2}\) [10, Main Theorem 6]; in this context, the technique of control statements was developed to prove upper and lower bounds for modal logics of classes of structures [12]. Various other aspects of the modal logic of forcing were considered in [4,5,6,7,8,9, 11, 12, 14, 16,17,18,19, 21].

The original definitions used for the modal logic of forcing and grounds required that the interpretation of the modal \(\Box \)-operator is expressible in the language \(\mathcal {L}\); this is not true in the general context of this paper. The first generalisation in this direction was discussed by Inamdar, the second author, and the third author in [3, 15] to allow arbitrary interpretations of the modal \(\Box \)-operator. These generalised definitions are the basis for our notion of validity of modal formulas in a class of structures. This has been studied abstractly in [20] and more concretely in the context of the class of graphs in [13].

2 Definitions and modal logic tools

Modal logic. The language \(\mathcal {L}_\Box \) of modal logic is the closure of a countable set \(\textrm{Prop}\) of propositional variables under the binary operation \(\wedge \) and the unary operations \(\lnot \) and \(\Box \). The symbol \(\Box \) is interpreted as “it is necessarily the case that”. As usual, we consider \(\vee \), \(\rightarrow \), \(\leftrightarrow \), and \(\Diamond \) to be defined in terms of \(\wedge \), \(\lnot \), and \(\Box \); in this case, \(\Diamond \) is interpreted as “it is possible that”. The elements of \(\mathcal {L}_\Box \) are called modal formulas.

A collection \(\Lambda \) of modal formulas closed under modus ponens is called a modal logic; it is called a normal modal logic if it contains the modal formula \(\Box (p\rightarrow q)\rightarrow (\Box p\rightarrow \Box q)\) and is additionally closed under uniform substitution and the necessitation rule (i.e., if \(\varphi \in \Lambda \), then \(\Box \varphi \in \Lambda \); cf. [2, § 1.6]).

Let \(\mathscr {C}\) be any class and \(\sqsubseteq \) be a definable binary (class) relation on \(\mathscr {C}\). We consider \((\mathscr {C},{\sqsubseteq )}\) as a Kripke frame; a valuation is a (class) function \(v:\textrm{Prop}\times \mathscr {C}\rightarrow \{0,1\}\); the triple \((\mathscr {C},{\sqsubseteq },v)\) is called a Kripke model; we say that the Kripke model \((\mathscr {C},{\sqsubseteq },v)\) lives on the Kripke frame \((\mathscr {C},{\sqsubseteq })\).

We can now define Kripke semantics for the language \(\mathcal {L}_\Box \). If \(\textbf{M}\in \mathscr {C}\), then

$$\begin{aligned} \mathscr {C},{\sqsubseteq },v,\textbf{M}\models p&:\iff v(p,\textbf{M})=1 (\text{if } p\in \textrm{Prop}),\\ \mathscr {C},{\sqsubseteq },v,\textbf{M}\models \phi \wedge \psi&:\iff \mathscr {C},{\sqsubseteq },v,\textbf{M}\models \phi \text{ and } \mathscr {C},{\sqsubseteq },v,\textbf{M}\models \psi ,\\ \mathscr {C},{\sqsubseteq },v,\textbf{M}\models \lnot \phi&:\iff \text{ not } \mathscr {C},{\sqsubseteq },v,\textbf{M}\models \phi \text{, } \text{ and }\\ \mathscr {C},{\sqsubseteq },v,\textbf{M}\models \Box \phi&:\iff \text{ for } \text{ all } \textbf{N}\in \mathscr {C} \text{ such } \text{ that } \textbf{M}\sqsubseteq \textbf{N}\text{, }\\&\quad \quad \text{ we } \text{ have } \text{ that } \mathscr {C},{\sqsubseteq },v,\textbf{N}\models \phi . \end{aligned}$$

A modal formula \(\varphi \) is called valid in a Kripke model \((\mathscr {C},{\sqsubseteq },v)\) if for each \(\textbf{M}\in \mathscr {C}\), we have that \(\mathscr {C},{\sqsubseteq },v,\textbf{M}\models \varphi \).

In order to avoid metamathematical issues, we shall consider definable valuations, i.e., valuations v such that there is a set parameter \(\pi \) and a set theoretic formula \(\Phi \) such that

$$\begin{aligned} v(p,\textbf{M}) = 0 \iff \Phi (\textbf{M},p,\pi ); \end{aligned}$$

a Kripke model \((\mathscr {C},{\sqsubseteq },v)\) is called definable if v is definable in the above sense. A modal formula \(\varphi \) is called definably valid in a Kripke frame \((\mathscr {C},{\sqsubseteq })\) if it is valid in every definable Kripke model living on \((\mathscr {C},{\sqsubseteq })\). We write \(\textrm{ML}(\mathscr {C},{\sqsubseteq })\) for the collection of modal formulas definably valid in \((\mathscr {C},{\sqsubseteq })\), called the modal logic of \((\mathscr {C},{\sqsubseteq })\).

The modal logic relevant for this paper is the modal logic \(\mathsf {S4.2}\); it is the smallest normal modal logic containing the formulas

$$\begin{aligned} {\textsf{T}}&\qquad \Box p\rightarrow p,\\ {\textsf{4}}&\qquad \Box p \rightarrow \Box \Box p\text{, } \text{ and }\\ \mathsf {.2}&\qquad \Diamond \Box p\rightarrow \Box \Diamond p. \end{aligned}$$

Modal logics of classes of structures. Let S be a non-logical vocabulary, \(\mathcal {L}_S\) be the first order language with vocabulary S, and \(\mathscr {C}\) be a class of \(\mathcal {L}_S\)-structures. Any language \(\mathcal {L}\supseteq \mathcal {L}_S\) is called \(\mathscr {C}\)-adequate if there is a definable model relation \(\models \) between elements of \(\mathscr {C}\) and \(\mathcal {L}\)-sentences that extends the usual model relation of \(\mathcal {L}_S\). Examples include infinitary languages or higher-order languages with the vocabulary S.

We call a function \(T:\textrm{Prop}\rightarrow \textrm{Sent}(\mathcal {L})\) assigning \(\mathcal {L}\)-sentences to propositional variables an \(\mathcal {L}\)-translation. An \(\mathcal {L}\)-translation gives rise to a valuation for the class \(\mathscr {C}\) called the \(\mathcal {L}\)-structure valuation:

$$\begin{aligned} v_T(p,\textbf{M}) = 1:\iff \textbf{M}\models T(p). \end{aligned}$$

Since the relation \(\models \) is definable, the \(\mathcal {L}\)-structure valuation is definable. We say that the \(\mathcal {L}\)-structure modal logic of \((\mathscr {C},{\sqsubseteq })\) is the set of modal formulas that are valid in each Kripke model \((\mathscr {C},{\sqsubseteq },v_T)\) for an \(\mathcal {L}\)-translation T. We write \(\textrm{ML}_\mathcal {L}(\mathscr {C},{\sqsubseteq })\) for the \(\mathcal {L}\)-structure modal logic of \((\mathscr {C},{\sqsubseteq })\); by definition and definability, \(\textrm{ML}(\mathscr {C},{\sqsubseteq }) \subseteq \textrm{ML}_\mathcal {L}(\mathscr {C},{\sqsubseteq })\).

Lower bounds. The validity of modal formulas on frames is closely linked to properties of the relation \(\sqsubseteq \); e.g., it is very easy to check that the formula \({\textsf{T}} = \Box p\rightarrow p\) is valid on a frame \((\mathscr {C},{\sqsubseteq })\) if and only if the relation \(\sqsubseteq \) is reflexive. We say that a frame \((\mathscr {C},{\sqsubseteq })\) is directed if for any there is a \(\textbf{N}\in \mathscr {C}\) such that \(\textbf{M}_0\sqsubseteq \textbf{N}\) and \(\textbf{M}_1\sqsubseteq \textbf{N}\). The relevant result for our context is the following theorem.

Theorem 2.1

If \((\mathscr {C},{\sqsubseteq })\) is any frame such that \(\sqsubseteq \) is reflexive, transitive, and directed, then \(\mathsf {S4.2}\subseteq \textrm{ML}(\mathscr {C},{\sqsubseteq })\).

Proof

This is an easy argument along the lines of the standard soundness proofs in modal logic; cf., e.g., [2, Theorems 4.28, and 4.29] and the analogous results for \(\mathsf {.2}\) (using directedness). \(\square \)

Upper bounds. The main tools to determine the structure modal logic of a class \(\mathscr {C}\) of structures are control statements, as developed in [10, 12]. The technique of control statements (based on the technique of Jankov-Fine formulas; cf. [2, pp. 143sq]) works in a setting where it is suspected that the established lower bound \(\Lambda \) is a normal modal logic with the finite frame property (i.e., there is a class \(\mathscr {F}\) of finite frames such that \(\varphi \in \Lambda \) is \(\varphi \) is valid in all frames in \(\mathscr {F}\)). Cf. [3, § 6] for an exposition of the general proof strategy for these proofs.

Let S be a vocabulary, \(\mathscr {C}\) be a class of \(\mathcal {L}_S\)-structures, \(\mathcal {L}\) be any \(\mathscr {C}\)-adequate language, and and \(\sqsubseteq \) a binary relation on \(\mathscr {C}\). An \(\mathcal {L}\)-sentence \(\beta \) is called a button in \((\mathscr {C},{\sqsubseteq })\) if for every \(\mathcal {L}\)-translation T such that \(T(p)=\beta \), we have that \(\Box \Diamond \Box p\) is valid in \((\mathscr {C},{\sqsubseteq },v_T)\); an \(\mathcal {L}\)-sentence \(\sigma \) is called a switch in \((\mathscr {C},{\sqsubseteq })\) if for every translation T such that \(T(p)=\sigma \), we have that \(\Box \Diamond p\wedge \Box \Diamond \lnot p\) is valid in \((\mathscr {C},{\sqsubseteq },v_T)\). If \(\textbf{M}\in \mathscr {C}\), we say that a button \(\beta \) is pushed in \(\textbf{M}\) if for each T with \(T(p) = \beta \), we have that \(\mathscr {C},{\sqsubseteq },\textbf{M},v_T\models \Box p\); otherwise, we say that it is unpushed. Similarly, a switch \(\sigma \) is switched on in \(\textbf{M}\) if for each T with \(T(p) = \sigma \), we have that \(\mathscr {C},{\sqsubseteq },\textbf{M},v_T\models p\); otherwise, we say that it is switched off.

Buttons are statements that can be made necessarily true; once they are pushed, they can never become unpushed again; moreover, they are necessarily of that form, i.e., they can necessarily be made necessarily true. In contrast, switches are statements that can always be switched on or off.

If \(B = \{\beta _i;\,0\le i\le n\}\) is a finite collection of buttons for \((\mathscr {C},{\sqsubseteq })\) and \(S = \{\sigma _j\,;\,0\le j\le m\}\) is a finite collection of switches for \((\mathscr {C},{\sqsubseteq })\), we say that the collection \(B\cup S\) is \(\mathcal {L}\)-independent for \((\mathscr {C},{\sqsubseteq })\) if for every \(I_0\subseteq I_1 \subseteq \{0,\ldots ,n\}\) und \(J_0,J_1\subseteq \{0,\ldots ,m\}\) and every \(\mathcal {L}\)-translation T with \(T(p_i) = \beta _i\) and \(T(q_j) = \sigma _j\), the formula

$$\begin{aligned} \left( \bigwedge _{i\in I_0} \Box p_i \wedge \bigwedge _{i\notin I_0} \lnot \Box p_i \wedge \bigwedge _{j\in J_0} q_j \wedge \bigwedge _{j\notin J_0} \lnot q_j\right) \rightarrow \\ \qquad \qquad \Diamond \left( \bigwedge _{i\in I_1} \Box p_i \wedge \bigwedge _{i\notin I_1} \lnot \Box p_i \wedge \bigwedge _{j\in J_1} q_j \wedge \bigwedge _{j\notin J_1} \lnot q_j\right) \end{aligned}$$

is valid in \((\mathscr {C},{\sqsubseteq },v_T)\). We express this formula in words:

If exactly the buttons with index in \(I_0\) are pushed and the switches with index in \(J_0\) are switched on, then it is possible to push exactly the buttons with index in \(I_1\supseteq I_0\) and switch exactly the switches with index in \(J_1\) on.

The existence of large independent sets of buttons and switches is closely linked to getting \(\mathsf {S4.2}\) as an upper bound.

Theorem 2.2

(Hamkins and Löwe). Let \(\mathscr {C}\) be a class of \(\mathcal {L}_S\)-structures, \(\mathcal {L}\) be a \(\mathscr {C}\)-adequate language, and and \(\sqsubseteq \) be a reflexive and transitive binary relation on \(\mathscr {C}\). If there are arbitrarily large finite sets B and S of buttons and switches for \((\mathscr {C},{\sqsubseteq })\) in \(\mathcal {L}\), respectively, such that \(B\cup S\) is \(\mathcal {L}\)-independent for \((\mathscr {C},{\sqsubseteq })\), then \(\textrm{ML}_\mathcal {L}(\mathscr {C},{\sqsubseteq })\subseteq \mathsf {S4.2}\).

Proof

A proof can be found in [10, Theorem 12] and [12, Theorem 13] for the context of multiverses of models of set theory. \(\square \)

Remark on the choice of language. Let \(\mathscr {C}\) be a class of \(\mathcal {L}_S\)-structures for some vocabulary S. If \(\mathcal {L}\) is a \(\mathscr {C}\)-adequate language, any \(\mathcal {L}_S\)-translation is a \(\mathcal {L}\)-translation, and thus we have \(\textrm{ML}(\mathscr {C},{\sqsubseteq })\subseteq \textrm{ML}_\mathcal {L}(\mathscr {C},{\sqsubseteq })\subseteq \textrm{ML}_{\mathcal {L}_S}(\mathscr {C},{\sqsubseteq })\). As a consequence, if we are in a situation where Theorems 2.1 and 2.2 apply for the first order language \(\mathcal {L}_S\) and we thus obtain

$$\begin{aligned} \mathsf {S4.2}\subseteq \textrm{ML}(\mathscr {C},{\sqsubseteq }) \subseteq \textrm{ML}_{\mathcal {L}_S}(\mathscr {C},{\sqsubseteq }) \subseteq \mathsf {S4.2}, \end{aligned}$$

then for all \(\mathscr {C}\)-adequate languages \(\mathcal {L}\), the equality \(\mathsf {S4.2}= \textrm{ML}_{\mathcal {L}}(\mathscr {C},{\sqsubseteq })\) holds. Therefore, \(\mathsf {S4.2}= \textrm{ML}_{\mathcal {L}_S}(\mathscr {C},{\sqsubseteq })\) is robust in the sense of [20, p. 1008]. Saveliev and Shapirovsky argue that “intuitively, the robust theory can be considered as a ‘true’ modal logic of the model-theoretical relation”.

3 The main result

In the following, we shall consider the first-order language of group theory \(\mathcal {L}_\textrm{Gr}\) with a single binary operation symbol \(+\) and the usual axioms

$$\begin{aligned} {\textsf{A}} := \{\,&\forall x\forall y\forall z (x+(y+z) = (x+y)+z),\\&\exists x\forall y\exists z (x+y = y\wedge y+z = x),\\&\forall x\forall y(x+y = y+x)\,\} \end{aligned}$$

defining the class \(\mathscr {A}\) of abelian groups. We use the symbol 0 to denote the neutral element and the symbol − to denote the unary inverse operation; both are definable in \(\mathcal {L}_\textrm{Gr}\), so we may use them freely in \(\mathcal {L}_\textrm{Gr}\)-formulas. As usual, if \(n\in {\mathbb {N}}\) and \(a\in A\), we define

$$\begin{aligned} n\cdot a&:= \underbrace{a+\dots +a}_{n\text { times}} \text{ and }\\ -n\cdot a&:= \underbrace{(-a)+\dots +(-a)}_{n\text { times}}. \end{aligned}$$

If \(n\in {\mathbb {N}}\), we say that an element \(a\in A\) has order n if n is the least positive number such that \(n\cdot a = 0\); we say that \(a\in A\) is divisible by n if there is some \(a^*\in A\) such that \(n\cdot a^* = a\). For \(\textbf{A},\textbf{B}\in \mathscr {A}\), we write \(\textbf{A}\le \textbf{B}\) if \(\textbf{A}\) is a subgroup of \(\textbf{B}\) and \(\textbf{A}\times \textbf{B}\) for the direct product of \(\textbf{A}\) and \(\textbf{B}\). As usual, we identify isomorphic groups, so par abus de langage, we use \(\textbf{A}\le \textbf{B}\) to stand for “\(\textbf{A}\) is isomorphic to a subgroup of \(\textbf{B}\)”.

Clearly, \(\textbf{A}\le \textbf{A}\times \textbf{B}\) and \(\textbf{B}\le \textbf{A}\times \textbf{B}\). If a has order n or is divisible by n in \(\textbf{A}\) and \(\textbf{A}\le \textbf{B}\), then a has order n or is divisible by n in \(\textbf{B}\), respectively. Furthermore, if p is a prime number, then \(\textbf{A}\times \textbf{B}\) has an element of order p if and only if at least one of \(\textbf{A}\) and \(\textbf{B}\) does.

The relation \(\le \) is clearly reflexive, transitive, and directed on \(\mathscr {A}\). As a consequence of Theorem 2.1, all modal formulas in \(\mathsf {S4.2}\) are valid in \((\mathscr {A},\le )\). The main theorem of this paper is that this lower bound is also an upper bound.

Main Theorem 3.1

The \(\mathcal {L}_\textrm{Gr}\)-structure modal logic of \((\mathscr {A},\le )\) is \(\mathsf {S4.2}\).

Towards a proof of the upper bound, we shall use Theorem 2.2 and produce arbitrarily large independent collections of buttons and switches.

Buttons. If p is a prime number, we define an \(\mathcal {L}_\textrm{Gr}\)-sentence

$$\begin{aligned} \beta _p = \exists x (x \ne 0 \wedge p\cdot x = 0), \end{aligned}$$

i.e., “there is an element of order p”. This is a button: if it is true in any group \(\textbf{A}\), then it will remain true in all \(\textbf{B}\) such that \(\textbf{A}\le \textbf{B}\). Note that these buttons are so called pure buttons: if one of them is true, then it is pushed (i.e., necessarily true). We can therefore say “\(\beta _p\) is pushed in \(\textbf{A}\)” if \(\textbf{A}\models \beta _p\). Clearly, the torsion group \({\mathbb {Z}}/p{\mathbb {Z}}\) has the button \(\beta _p\) pushed and all others are unpushed. Furthermore, by the above remark about elements of finite order in products, \(\beta _p\) is pushed in \(\textbf{A}\times \textbf{B}\) if and only if it is pushed in \(\textbf{A}\) or in \(\textbf{B}\).

These two algebraic facts immediately imply that if P is a finite set of primes, forming the product with the group \(\textbf{B}_P:= \prod _{p\in P}{\mathbb {Z}}/p{\mathbb {Z}}\) will push all buttons with index in P and no additional buttons.

Switches. For our switches, we define for each prime number p the \(\mathcal {L}_\textrm{Gr}\)-sentence

$$\begin{aligned} \sigma _p = \forall x \exists y (p\cdot y = x), \end{aligned}$$

i.e., “every element is divisible by p”. It is easy to switch \(\sigma _p\) off: if \(p\ne q\), then for any group \(\textbf{A}\), the group \(\textbf{B}:= \textbf{A}\times {\mathbb {Z}}/q{\mathbb {Z}}\) will have switched \(\sigma _p\) off. Switching \(\sigma _p\) on requires more work, in particular if we aim to avoid interference with the other switches and buttons. That the sentences \(\sigma _p\) are switches will follow from Lemma 3.5.

The following main lemma about these control statements will provide us with all we need to prove the main result.

Lemma 3.2

Let P and Q be two finite disjoint sets of prime numbers. The set \(\lbrace \beta _p\,;\,p \in P \rbrace \cup \lbrace \sigma _q\,;\,q \in Q \rbrace \) is independent over \((\mathscr {A},\le )\).

Main Theorem 3.1 follows directly from Theorem 2.2 and Lemma  3.2. This means that our remaining task is the proof of Lemma 3.2. This in turn requires two technical group theoretic tools: controlled group amplifications and localisations.

Controlled group amplifications. Let \(\textbf{A}= (A,+)\) and \(\textbf{B}= (B,+)\) be two abelian groups and assume that \({\mathbb {Z}}\le \textbf{B}\); without loss of generality, we can assume that \({\mathbb {Z}} \subseteq H\).

Consider the set \(B^A\) of functions from A to B; if \(f \in B^A\), we define the support of f by \(\textrm{supp}(f):= \{ a\in A\,;\,f(a) \ne 0\}\). The set \(B^A\) becomes an abelian group \(\textbf{B}^\textbf{A}\) with component-wise addition \(f+g(a):= f(a)+g(a)\), inverse \((-f)(a):= -(f(a))\), and the constant function \(\textbf{0}(a):= 0\) as neutral element. As usual, we write \(f-g:= f+(-g)\).

A function \(f\in B^A\) is called integral if \(\textrm{supp}(f)\) is finite and \(\textrm{ran}(f)\subseteq {\mathbb {Z}}\). For integral functions f, the weighted sum

$$\begin{aligned} W(f):= \sum _{a\in A} f(a)\cdot a \end{aligned}$$

is defined since all values f(a) are integers and only finitely many of them are non-zero. It is easy to see that if f and g are integral, then so are \(-f\) and \(f+g\), and (using the fact that \(\textbf{A}\) is abelian) we have \(W(-f) = -W(f)\) and \(W(f+g) = W(f)+ W(g)\).

For \(f,g\in B^A\), we say that f and g are equivalent, in symbols, \(f\sim g\), if \(f-g\) is integral and \(W(f-g) = 0\). Note that if f is integral and \(f\sim g\), then g is integral. Obviously, \(\sim \) is reflexive and since \(g-f = -(f-g)\), the above fact about inverses of integral functions shows that it is symmetric. Furthermore, since \(f-h = f-(g-g)-h = (f-g)+(g-h)\), transitivity follows from the above fact about sums of integral functions. Thus, \(\sim \) is an equivalence relation on \(B^A\). As usual, we write [f] for the \(\sim \)-equivalence class of f.

We write \(\textbf{A}[\textbf{B}]\) for the quotient of \(\textbf{B}^\textbf{A}\) by the equivalence relation \(\sim \) and call it the controlled amplification of \(\textbf{A}\) by \(\textbf{B}\). It is easy to check that \(\textbf{A}[\textbf{B}]\) with the well-defined operation \([f]+[g]:= [f+g]\) forms an abelian group.

Lemma 3.3

\(\textbf{A}\le \textbf{A}[\textbf{B}]\).

Proof

Define \(F :A \rightarrow B^A\) by

Note that for any a, F(a) is an integral function with \(W(F(a)) = a\). Clearly, \(F(0)\ne \textbf{0}\ne F(a)+F(-a)\), so F is not a homomorphism from \(\textbf{A}\) into \(\textbf{B}^\textbf{A}\). However, \(F(0)\sim \textbf{0}\) and \(F(a)+F(-a) \sim \textbf{0}\); the function F induces a monomorphism from \(\textbf{A}\) into the quotient \(\textbf{A}[\textbf{B}]\):

To see that it is a homomorphism, we need to show for any \(a,a^*\in A\) that \([F(a+a^*)] = [F(a)+F(a^*)]\). Since all of the functions F(a) are integral, so are their sums and inverses. We have that

$$\begin{aligned} W(F(a+a^*)-F(a)-F(a^*))&= 1\cdot (a+a^*) - 1\cdot a - 1 \cdot a^*\\&= a+a^*-a-a^* = 0. \end{aligned}$$

In order to show its injectivity, suppose that \([F(a)] = [F(a^*)]\), i.e., \(F(a)-F(a^*) \sim \textbf{0}\). Thus

$$\begin{aligned}0&= W(F(a)-F(a^*)) \\&= 1\cdot a - 1\cdot a^*\\&= a-a^*. \end{aligned}$$

But this implies that \(a = a^*\) due to the cancellation laws in groups. \(\square \)

Localisations. Our second technical tool is that of a localisation. If P is a set of prime numbers, let \(\langle P\rangle \) be the set of all natural numbers that have only prime factors in P (including 1). We write \({\mathbb {Q}}_P:=\lbrace \frac{z}{n}\in {\mathbb {Q}}\,;\,z\in {\mathbb {Z}}, n \in \langle P \rangle \rbrace .\) By the usual rules of addition of fractions, \({\mathbb {Q}}_P\) is an additive subgroup of the rational numbers, i.e., \({\mathbb {Z}}\le {\mathbb {Q}}_P \le {\mathbb {Q}}\). We shall use the arithmetical fact that for all primes \(p\notin P\) and \(a\in {\mathbb {Q}}_P\), we have that \(a\notin {\mathbb {Z}}\) if and only if \(p\cdot a\notin {\mathbb {Z}}\). This implies that for any set X,

$$\begin{aligned} \hbox {if} \,p\,\notin P\, \hbox {is a prime and} \,&f:X\rightarrow {\mathbb {Q}}_P,\\&\hbox {then} \,\textrm{ran}(p\cdot f)\subseteq {\mathbb {Z}} \,\,\hbox {if and only if}\,\, \textrm{ran}(f)\subseteq {\mathbb {Z}}. \end{aligned}$$
(*)

As a subgroup of the rationals, \({\mathbb {Q}}_P\) has no elements of finite order, so all of our buttons \(\beta _p\) are unpushed in \({\mathbb {Q}}_P\). Moreover, as the next lemma shows, amplifying by \({\mathbb {Q}}_P\) does not push any buttons with index not in P.

Lemma 3.4

Let \(\textbf{A}\) be an abelian group and P be a set of prime numbers. If \(p\notin P\) is a prime, then \(\beta _p\) is pushed in \(\textbf{A}\) if and only if \(\beta _p\) is pushed in \(\textbf{A}[{\mathbb {Q}}_P]\).

Proof

Using Lemma 3.3, if \(\beta _p\) is pushed in \(\textbf{A}\), it will remain pushed in \(\textbf{A}[{\mathbb {Q}}_P]\). Suppose \(\beta _p\) is pushed in \(\textbf{A}[{\mathbb {Q}}_P]\), i.e., there is some \(f:A\rightarrow {\mathbb {Q}}_P\) such that \(f\not \sim \textbf{0}\), but \(p\cdot f\sim \textbf{0}\). Since \(\textbf{0}\) is integral, \(p\cdot f\) must be integral, and hence by (*), f is integral (utilising that \(p\notin P\)). Therefore W(f) is defined and \(f\not \sim \textbf{0}\) implies that \(W(f) \ne 0\). But then

$$\begin{aligned} 0 = W(p\cdot f) = \sum _{a\in A}p\cdot f(a)\cdot a = p\cdot \sum _{a\in A} f(a)\cdot a = p\cdot W(f) \end{aligned}$$

and hence W(f) is an element of order p in \(\textbf{A}\). \(\square \)

It is easy to see that the switch \(\sigma _p\) is on in \({\mathbb {Q}}_P\) if and only if \(p\in P\); this generalises to certain amplifications of groups by \({\mathbb {Q}}_P\).

Lemma 3.5

Let \(\textbf{A}\) be an abelian group and P be a set of prime numbers. Let \(\textbf{A}^* = \textbf{A}\times {\mathbb {Z}}\). Then for all primes p, the switch \(\sigma _p\) is switched on in \(\textbf{A}^*[{\mathbb {Q}}_P]\) if and only if \(p\in P\).

Proof

Firstly, suppose that \(p\in P\). Let \([f]\in \textbf{A}^*[{\mathbb {Q}}_P]\), i.e., \(f:A\times {\mathbb {Z}}\rightarrow {\mathbb {Q}}_P\). This means that for every \((a,z)\in A\times {\mathbb {Z}}\), we have that \(\frac{f(a,z)}{p}\in {\mathbb {Q}}_P\). Define

$$\begin{aligned} g:A\times {\mathbb {Z}}\rightarrow {\mathbb {Q}}_P: (a,z)\mapsto \frac{f(a,z)}{p} \end{aligned}$$

and by definition \(p\cdot g = f\), so f is divisible by p in \({{\mathbb {Q}}_P}^{\textbf{A}^*}\). Thus [f] is divisible by p in \(\textbf{A}^*[{\mathbb {Q}}_P]\).

Now suppose that \(p\notin P\). Consider \((0,1)\in A\times {\mathbb {Z}}\) and \(F(0,1)\in {{\mathbb {Q}}_P}^{A\times {\mathbb {Z}}}\), i.e.,

$$\begin{aligned} F(0,1)(a,z):= {\left\{ \begin{array}{ll} 1 &{} \text { if } (0,1)=(a,z), \\ 0 &{} \text { otherwise} \end{array}\right. } \end{aligned}$$

(cf. the proof of Lemma 3.3 for the definition of F). We claim that \([F(0,1)]\in \textbf{A}^*[{\mathbb {Q}}_P]\) is not divisible by p.

Suppose towards a contradiction that there is some \(f\in {{\mathbb {Q}}_P}^{A\times {\mathbb {Z}}}\) such that \(p\cdot [f] = [p\cdot f] = [F(0,1)]\), i.e., \(p\cdot f\sim F(0,1)\). Since F(0, 1) is integral by definition, this means that \(p\cdot f\) must be integral, so \(\textrm{ran}(p\cdot f) \subseteq {\mathbb {Z}}\) and thus, since \(p\notin P\), \(\textrm{ran}(f)\subseteq {\mathbb {Z}}\) using (*). By equivalence of \(p\cdot f\) and F(0, 1), we obtain

$$\begin{aligned} (0,0)&= \sum _{(a,z)\in A\times {\mathbb {Z}}} (p\cdot f-F(0,1))(a,z)\cdot (a,z)\\&= \sum _{(a,z)\in A\times {\mathbb {Z}}} (p\cdot f)(a,z)\cdot (a,z)-F(0,1)(a,z)\cdot (a,z)\\&= \sum _{(a,z)\in A\times {\mathbb {Z}}} (p\cdot f)(a,z)\cdot (a,z)-\sum _{(a,z)\in A\times {\mathbb {Z}}}F(0,1)(a,z)\cdot (a,z)\\&= \sum _{(a,z)\in A\times {\mathbb {Z}}} (p\cdot f)(a,z)\cdot (a,z) - (0,1), \end{aligned}$$

hence \(\sum _{(a,z)\in A\times {\mathbb {Z}}} (p\cdot f)(a,z)\cdot (a,z) = (0,1)\). By the earlier analysis of the integrality of f, we know that the sum on the left-hand side is a finite sum of terms of the form \(p\cdot \zeta \cdot (a,z)\) for some integer \(\zeta \). The group \(\textbf{A}^* = \textbf{A}\times {\mathbb {Z}}\) is a direct product, so we may consider the second coordinate of this sum; we obtain as equation for the second coordinate

$$\begin{aligned} 1 = \sum _{i=0}^n p\cdot \zeta _i\cdot z_i = p\cdot \sum _{i=0}^n \zeta _i\cdot z_i \end{aligned}$$

for some integers \(\zeta _i\) and \(z_i\). But then 1 would be divisible by p in \({\mathbb {Z}}\) which is absurd. Contradiction! \(\square \)

Note that Lemma 3.5 implies that the sentences \(\sigma _p\) are switches: if \(\textbf{A}\) is an arbitrary group, then \(\textbf{A}\le \textbf{A}\times {\mathbb {Z}} =: \textbf{A}^* \le \textbf{A}^*[{\mathbb {Q}}_P]\) by Lemma 3.3. By choosing P appropriately, we can create any pattern of switches turned on and off in the group \(\textbf{A}^*[{\mathbb {Q}}_P]\) by Lemma 3.5.

These technical tools now allow us to finally prove Lemma 3.2.

Proof of Lemma 3.2

Let P and Q be two finite disjoint sets of primes. Let \(\textbf{A}\) be an abelian group in which for some \(P_0\subseteq P\) the sentence \(\bigwedge _{p\in P_0}\beta _p\wedge \bigwedge _{p\in P{\setminus }P_0}\lnot \beta _p\) holds. Let \(P_0\subseteq P_1\subseteq P\) and \(Q_1\subseteq Q\). We need to find a group \(\textbf{B}\) such that \(\textbf{A}\le \textbf{B}\) where the sentence

figure a

holds. First we push the additional buttons using the group

$$\begin{aligned} \textbf{B}_{P_1{\setminus }P_0} = \prod _{p\in P_1{\setminus }P_0} {\mathbb {Z}}/p{\mathbb {Z}} \end{aligned}$$

and obtain \(\textbf{A}^+:= \textbf{A}\times \textbf{B}_{P_1{\setminus }P_0}\). The buttons pushed in \(\textbf{A}^+\) are precisely the ones with index in \(P_1\). We now form \(\textbf{A}^*:= \textbf{A}^+\times {\mathbb {Z}}\) and build the controlled group amplification of \(\textbf{A}^*\) with \({\mathbb {Q}}_{Q_1}\), i.e., \(\textbf{B}:= \textbf{A}^*[{\mathbb {Q}}_{Q_1}]\) and claim that \(\textbf{B}\) satisfies (†).

Switches. By Lemma 3.5, the switches turned on in \(\textbf{B}\) are precisely those with index in \(Q_1\).

Buttons. The group \(\textbf{A}^*\) is a direct product and so the buttons pushed in \(\textbf{A}^*\) are precisely the ones pushed in one of the factors; thus, \(\beta _p\) is pushed in \(\textbf{A}^*\) if and only if \(p\in P_1\). But \(Q_1\cap P = \varnothing \), so Lemma 3.4 implies that for every \(p\in P\), we have that \(\beta _p\) is pushed in \(\textbf{A}^*\) if and only if \(\beta _p\) is pushed in \(\textbf{B}\). \(\square \)

4 The modal logic of groups

The lower bound argument given before Main Theorem 3.1 does not require the groups to be abelian: the same argument yields that the structure modal logic of the class of all groups contains \(\mathsf {S4.2}\).

However, our constructions for the upper bound made crucial use of commutativity: most centrally, the definition of the controlled amplification \(\textbf{A}[\textbf{B}]\) only works for abelian groups. This suggests the following open question:

Question 4.1

What is the modal logic of the class of all groups with the subgroup relation?