# On the Semantics of Hybrid ASP Systems Based on Clingo
## Appendix A Examples of Abstract Theories
For the denotations, we have \(D_{\mathfrak{A}}=\{0,1,\frac{1}{2}\}\) and \(v\in\llbracket\,\varphi\,\rrbracket\) iff \(f_{v}(\varphi)=1\) for the evaluation function \(f_{v}\) recursively defined as:_  
* \(f_{v}(\bot)\stackrel{{\text{\tiny def}}}{{=}}0\)_,_ \(f_{v}(\top)\stackrel{{\text{\tiny def}}}{{=}}1\)__
* \(f_{v}(x)\stackrel{{\text{\tiny def}}}{{=}}v(x)\) _for atoms_ \(x\in\mathcal{X}_{pr}\)__
* \(f_{v}(\varphi\wedge\varphi)\stackrel{{\text{\tiny def}}}{{=}} \min\bigl{(}f_{v}(\varphi),f_{v}(\psi)\bigr{)}\)__
* \(f_{v}(\varphi\vee\varphi)\stackrel{{\text{\tiny def}}}{{=}}\max \bigl{(}f_{v}(\varphi),f_{v}(\psi)\bigr{)}\)__
* \(f_{v}(\
eg\varphi)\stackrel{{\text{\tiny def}}}{{=}}1-f_{v}(\varphi)\)__
* \(f_{v}(\varphi\rightarrow\psi)\stackrel{{\text{\tiny def}}}{{=}}f_{v}( \
eg\varphi\vee\psi)\)__  
_As an example, the denotation of atom \(p\) would correspond to:_  
\[\llbracket\,\texttt{\&prop}\{p\}\,\rrbracket_{\mathfrak{K}}=\{(p=1,q=0),(p=1,q =1/2),(p=1,q=1)\}\]  
_and the denotation of its complement is:_  
\[\llbracket\,\texttt{\&prop}\{\
eg p\}\,\rrbracket_{\mathfrak{K}}=\{(p=0,q=0),(p= 0,q=1/2),(p=0,q=1)\}\]  
_but as we can see, there are valuations, such as \((p=1/2,q=0)\), that are not included in either of the two._  
**Example A3**. : _Imagine that, in \(\mathfrak{K}\), we added the operator \(M\varphi\) such that_  
\[f_{\
u}(M\varphi)\stackrel{{\mathrm{def}}}{{=}}\left\{ \begin{array}[ ]{ll}0&\text{if }f_{\
u}(\varphi)=0\\ 1&\text{otherwise}\end{array} \right.\]  
_that can then be read as \"\(p\) is not false\". Then \(\mathfrak{k}\mathtt{prop}\{M\}\approx_{\mathfrak{K}}\mathfrak{k}\mathtt{prop}\{p\}\) since \(\Gamma=\{Mp,\
eg p\}\) is unsatisfiable because no valuation \(v\) can assign \(f_{\
u}(M\varphi)=1\) and \(f_{\
u}(\
eg p)=1\) simultaneously. However, regular entailment is not satisfied, \(\mathfrak{k}\mathtt{prop}\{M\}\models_{\mathfrak{K}}\mathfrak{k}\mathtt{prop}\{p\}\), because there are valuations in \(\llbracket\,\mathfrak{k}\mathtt{prop}\{Mp\}\,\rrbracket_{\mathfrak{K}}\) (anyone assigning \(1/2\) to \(p\)) that are not in \(\llbracket\,\mathfrak{k}\mathtt{prop}\{p\}\,\rrbracket_{\mathfrak{K}}\)._  
**Example A4** (Lukasiewicz Fuzzy logic). : _Let us consider \(\mathfrak{F}\) for capturing Lukasiewicz Fuzzy Logic. We define \(\mathfrak{F}\) with the same syntax (theory atoms and complement) as before, but \(\mathcal{S}\) now contains every set \(S\) of atoms such that \(\Gamma=\{\varphi\mid\,\mathfrak{k}\mathtt{prop}\{\varphi\}\in S\}\) has some model in Fuzzy Logic. For the denotations, we have \(D_{\mathfrak{F}}=[0,1]\) as an interval over real numbers, and \(v\in\llbracket\,\varphi\,\rrbracket\) iff \(f_{\
u}(\varphi)=1\) for the evaluation function \(f_{\
u}\) recursively defined as:_  
* \(f_{\
u}(\bot)\stackrel{{\mathrm{def}}}{{=}}0\)_,_ \(f_{\
u}(\top)\stackrel{{\mathrm{def}}}{{=}}1\)__
* \(f_{\
u}(x)\stackrel{{\mathrm{def}}}{{=}}v(x)\) _for atoms_ \(x\in\mathcal{X}_{pr}\)__
* \(f_{\
u}(\varphi\wedge\varphi)\stackrel{{\mathrm{def}}}{{=}}\min(f_ {\
u}(\varphi),f_{\
u}(\psi))\)__
* \(f_{\
u}(\varphi\vee\psi)\stackrel{{\mathrm{def}}}{{=}}\max(f_ {\
u}(\varphi),f_{\
u}(\psi))\)__
* \(f_{\
u}(\
eg\varphi)\stackrel{{\mathrm{def}}}{{=}}1-f_{\
u}(\varphi)\)__
* \(f_{\
u}(\varphi\rightarrow\psi)\stackrel{{\mathrm{def}}}{{=}}\min(1, 1-f_{\
u}(\varphi)+f_{\
u}(\psi))\)__  
We conclude with an example of abstract theory that covers Description Logic \(\mathcal{ALC}\) (other variants of Description Logics can be analogously defined). The most relevant feature, in this case, is that both variables and domain elements are partitioned into objects, concepts, and roles. **Example A5** (Description Logic \(\mathcal{ALC}\)). : _Let us consider \(\mathfrak{D}\) for capturing Description Logics (DL). The set of variables \(\mathcal{X}\), in this case, is partitioned into object names \(\mathcal{X}_{o}\), concept names \(\mathcal{X}_{c}\), and role names \(\mathcal{X}_{r}\).