# On the Semantics of Hybrid ASP Systems Based on Clingo
## Appendix A Examples of Abstract Theories  
Next, we define a family of abstract theories that encode some propositional logic, having a common set of theory atoms \(\mathcal{T}_{pr}\) of the form \(\mathcal{K}\texttt{prop}\{\varphi\}\) for any propositional formula \(\varphi\) that can be formed for a set of variables \(\mathcal{X}_{pr}=\{p,q,\ldots\}\), standing for propositional atoms, and with a fixed complement \(\widehat{\texttt{\&prop}\{\varphi\}}\stackrel{{\text{\tiny def}}}{{=}} \texttt{\&prop}\{\
eg\varphi\}\). **Example A1** (Equilibrium logic). : _Take the abstract theory \(\mathfrak{e}=\langle\mathcal{T}_{pr},\mathcal{S}_{r}\rangle\) with set \(\mathcal{S}\) contains every set \(S\) of atoms whose set of formulas \(\Gamma=\{\varphi\mid\texttt{\&prop}\{\varphi\}\in S\}\) has some equilibrium model and negation as complement, as explained above. For a formal definition of Equilibrium Logic, we refer to [17]: for theories in the form of logic programs (as the ones we comment on below), it suffices to observe that equilibrium models coincide with stable models. As we can see, in this context, theory atoms talk about the inclusion of formulas \(\varphi\) (or their negation \(\
eg\varphi\)) in an external logical theory \(\Gamma\). For instance, we could write a program like:_  
\[\texttt{\&prop}\{\
eg q\to p\}\] \[\texttt{a}\ \leftarrow\ \texttt{\&prop}\{\
eg p\to q\}\]  
_Theory atom \(\mathcal{K}\texttt{prop}\{\
eg p\to q\}\) is external: if we add it to the program, we obtain a stable model \(X_{1}\) containing both theory atoms plus the propositional atom \(\mathtt{a}\). In fact, \(X_{1}\) is also a \(\mathfrak{e}\)-stable model since the induced logical theory \(\Gamma_{1}=\{(\
eg p\to q),(\
eg q\to p)\}\) has (two) equilibrium models. If we do not include the external atom, stable model \(X_{2}\) would just contain the defined atom \(\mathcal{K}\texttt{prop}\{\
eg q\to p\}\). This stable model does not pass the \(\mathfrak{e}\)-check since when we add the complement of the external atom, we get a logical theory \(\Gamma_{2}=\{(\
eg p\to q),\
eg(\
eg q\to p)\}\) that has no equilibrium model (The formula \(\
eg(\
eg q\to p)\) is HT-equivalent to \(\
eg q\wedge\
eg p\))._  
Note that the abstract entailment relation \(\ket_{\Xi}\) for this abstract theory does not satisfy monotonicity. For instance, \(\mathcal{K}\texttt{prop}\{\
eg p\to q\}\ket_{\Xi}\mathcal{K}\texttt{prop}\{q\}\) because adding the complement \(\mathcal{K}\texttt{prop}\{\
eg q\}\) to \(\mathcal{K}\texttt{prop}\{\
eg p\to q\}\) produces no equilibrium model. Yet, if we extend the theory with atom \(p\), this is not true anymore, namely \(\{\mathcal{K}\texttt{prop}\{\
eg p\to q\},\mathcal{K}\texttt{prop}\{p\}\} \ket_{\Xi}\mathcal{K}\texttt{prop}\{q\}\) does not hold. **Example A2** ([PERSON]'s three-valued logic). : _As an example of compositional theory without an absolute complement, consider \(\mathfrak{K}\) for capturing [PERSON]'s three-valued propositional logic. We define \(\mathfrak{K}\) with the same syntax (theory atoms and complement) as \(\mathfrak{e}\), with the only difference that \(\mathcal{S}\) now contains every set \(S\) of atoms such that \(\Gamma=\{\varphi\mid\texttt{\&prop}\{\varphi\}\in S\}\) has some three-valued model.