\documentclass{article} \usepackage{natbib} \input{common} \title{AFT and HMKNF} \author{} \date{May 25th 2023} \begin{document} \maketitle \section{An Approximator Hybrid MKNF knowledge bases} The lattice $\langle \L^2, \preceq_p \rangle$ \begin{align*} \Gamma(T, P) &\define \{ \head(r) ~|~ r \in \P,~ T \subseteq \bodyp(r),~ \bodyn(r) \intersect P = \emptyset \}\\ extract(T) &\define \{ a \in \L ~|~ \OBO{T} \models \neg a \} \\ \Phi(T, P) &\define \Bigl( \Gamma(T, P), \Gamma(P, T) \setminus extract(T) \Bigr) \end{align*} \begin{align*} S(\Phi)(T, P) \define \Bigl( \lfp~\Gamma(\cdot, P),~ \lfp\,\Bigl( \Gamma(\cdot, T) \setminus extract(T) \Bigr) \Bigr) \end{align*} \appendix \section{Lattice Theory} \begin{definition} A {\em partial order} $\preceq$ is a relation over a set $S$ such that for every triple of elements $x, y, z \in S$ the following hold \begin{itemize} \item (reflexivity) $x \preceq x$ \item (antisymmetry) $(x \preceq y \land y \preceq x) \implies x = y$ \item (transitivity) $(x \preceq y \land y \preceq z) \implies (x \preceq z)$ \end{itemize} \end{definition} \begin{definition} Given a partial order $\preceq$ over a set $S$ and a subset $X \subseteq S$, a {\em lower bound} of $X$ (resp.\ an {\em upper bound} of $X$) is an element $x \in S$ (Note that it may be the case that $x \not\in X$) such that \begin{itemize} \item $\forall y \in X, \boxed{x} \preceq y$ \item (resp. $\forall y \in X, \boxed{y} \preceq x$) \end{itemize} The {\em greatest lower bound} of a set $X \subseteq S$ (denoted as $\textbf{glb}(X)$) is a unique upperbound of the set of all lowerbounds of $X$. The {\em least upper bound} of a set $X \subseteq S$ (denoted as $\textbf{lub}(X)$) is a unique lowerbound of the set of all upperbounds of $X$. In general, $\textbf{lub}(X)$ and $\textbf{glb}(X)$ may not exist. \end{definition} \begin{definition} A (complete) lattice $\langle \mathcal{L}, \preceq \rangle$ is a set of elements $\mathcal{L}$ and a partial order $\preceq$ over $\mathcal{L}$ such that for any set $S \subseteq \mathcal{L}$ \begin{itemize} \item $\textbf{lub}(X)$ and $\textbf{glb}(X)$ exist and are unique. \end{itemize} \end{definition} \section{Partial Stable Model Semantics} \begin{definition} A (ground and normal) {\em answer set program} $\P$ is a set of rules where each rule $r$ is of the form \begin{align*} h \leftarrow a_0,~ a_1,~ \dots,~ a_n,~ \Not b_0,~\Not b_1,~\dots,~\Not b_k \end{align*} where we define the following shorthand for a rule $r \in \P$ \begin{align*} \head(r) &= h\\ \bodyp(r) &= \{ a_0,~ a_1,~ \dots,~ a_n \}\\ \bodyn(r) &= \{ b_0,~ b_1,~ \dots,~ b_k \} \end{align*} \end{definition} \begin{definition} A two-valued interpretation $I$ of a program $\P$ is a set of atoms that appear in $\P$. \end{definition} \begin{definition} An interpretation $I$ is a \boxedt{model} of a program $\P$ if for each rule $r \in \P$ \begin{itemize} \item If $\bodyp(r) \subseteq I$ and $\bodyn(r) \intersect I = \emptyset$ then $\head(r) \in I$. \end{itemize} \end{definition} \begin{definition} An interpretation $I$ is a \boxedt{stable model} of a program $\P$ if $I$ is a model of $\P$ \textbf{and} for every interpretation $I' \subseteq I$ there exists a rule $r \in \P$ such that \begin{itemize} \item $\bodyp(r) \subseteq I'$, $\bodyn(r) \intersect I \not= \emptyset$ (Note that this is $I$ and not $I'$) and $\head(r) \not\in I'$ \end{itemize} \end{definition} \begin{definition} A three-valued interpretation $(T, P)$ of a program $\P$ is a pair of sets of atoms such that $T \subseteq P$. The \boxedt{truth-ordering} respects $\ff < \uu < \tt$ and is defined for two three-valued interpretations $(T, P)$ and $(X, Y)$ as follows. \begin{align*} (T, P) \preceq_t (X, Y) \textrm{ iff } T \subseteq X \land P \subseteq Y \end{align*} The \boxedt{precision-ordering} respects the partial order $\uu < \tt$, $\uu < \ff$ and is defined for two three-valued interpretations $(T, P)$ and $(X, Y)$ as follows. \begin{align*} (T, P) \preceq_p (X, Y) \textrm{ iff } T \subseteq X \land \boxed{Y \subseteq P} \end{align*} \end{definition} \begin{definition} A three-valued interpretation $(T, P)$ is a {\em model} of a program $\P$ if for each rule $r \in \P$ \begin{itemize} \item $\body(r) \subseteq P \land \bodyn(r) \intersect T = \emptyset$ implies $\head(r) \in P$, and \item $\body(r) \subseteq T \land \bodyn(r) \intersect P = \emptyset$ implies $\head(r) \in T$. \end{itemize} \end{definition} \begin{definition} A three-valued interpretation $(T, P)$ is a {\em stable model} of a program $\P$ if it is a model of $\P$ and if for every three-valued interpretation $(X, Y)$ such that $(X, Y) \preceq_t (T, P)$ there exists a rule $r \in \P$ such that either \begin{itemize} \item $\bodyp(r) \subseteq Y \land \bodyn(r) \intersect T = \emptyset$ and $\head(r) \not\in Y$ \textbf{OR} \item $\bodyp(r) \subseteq X \land \bodyn(r) \intersect P = \emptyset$ and $\head(r) \not\in X$ \end{itemize} \end{definition} \subsection{Fixpoint Operators} \begin{definition} Given a complete lattice $\langle \mathcal{L}, \preceq \rangle$, a fixpoint operator over the lattice is a function $\Phi: \mathcal{L} \rightarrow \mathcal{L}$ that is {\em $\preceq$-monotone} \begin{itemize} \item $\Phi$ is $\preceq$-monotone if for all $x, y \in \mathcal{L}$ \begin{align*} x \preceq y \implies \Phi(x) \preceq \Phi(y) \end{align*} (Note: this does not mean the function is inflationary, i.e., $x \preceq \Phi(x)$ may not hold) \end{itemize} A {\em fixpoint} is an element $x \in \mathcal{L}$ s.t. $\Phi(x) = x$. \end{definition} \begin{theorem}[Knaster-Tarski] The set of all fixpoints of a fixpoint operator $\Phi$ on a complete lattice is itself a complete lattice. The least element of this new lattice exists and is called the least fixpoint (denoted as $\lfp~{\Phi}$) \end{theorem} Some intuitions about lattices \begin{itemize} \item The entire lattice has a biggest element $\lub{}(\mathcal{L}) = \top$ and a smallest element $\glb{}(\mathcal{L}) = \bot$ \item When a lattice has a finite height (or finite domain). The least fixed point of a fixpoint operator can be computed by iteratively applying the fixpoint operator to $\bot$ \item An operator may return an element that is not comparable to the input, however, after a comparable element is returned (either greater or less than) that comparability and direction are maintained for all subsequent iterations. \item Further, because $\bot$ is less than all elements in the lattice, it is always the case that $\bot \preceq \Phi(\bot)$ \end{itemize} \section{Approximation Fixpoint Theory} We can think of a three-valued interpretation $(T, P)$ as an approximation on the set of true atoms. $T$ is a lower bound and $P$ is the upper bound. \begin{definition} An {\em approximator} is a fixpoint operator on the complete lattice $\langle \wp(\mathcal{L})^2, \preceq_p \rangle$ (called a bilattice) \end{definition} Given a function $f(T, P): S^2 \rightarrow S^2$, we define two separate functions \begin{align*} f(\cdot, P)_1:~ &S \rightarrow S\\ f(T, \cdot)_2:~ &S \rightarrow S \end{align*} such that \begin{align*} f(T, P) = \Big(&(f(\cdot, P)_1)(T), \\&(f(T, \cdot)_2)(P)\Big) \end{align*} \begin{definition} Given an approximator $\Phi(T, P)$ the stable revision operator is defined as follows \begin{align*} S(T, P) = (\lfp{(\Phi(\cdot, P)_1)},~ \lfp{(\Phi(T, \cdot)_2)}) \end{align*} Note: the $\lfp$ is applied to a unary operator, thus it's the least fixpoint of the lattice $\langle \wp(\mathcal{L}), \subseteq \rangle$ whose least element is $\emptyset$. \end{definition} \section{Hybrid MKNF Knowledge Bases}\label{section-prelim-hmknf} Motik and Rosati \cite{motikreconciling2010} extend MKNF (Minimal Knowledge and Negation as Failure \cite{lifschitznonmonotonic1991}) to form hybrid MKNF, a nonmonotonic logic that supports classical reasoning with ontologies. We use Knorr et al.'s \cite{knorrlocal2011} \mbox{3-valued} semantics for hybrid MKNF; Under which there are three truth values: $\ff$ (false), $\uu$ (undefined), and $\tt$ (true) that use the ordering $\ff < \uu < \tt$. The $min$ and $max$ functions respect this ordering when applied to sets. MKNF relies on the standard name assumption under which every first-order interpretation in an MKNF interpretation is required to be a Herbrand interpretation with a countably infinite amount of additional constants. We use $\Delta$ to denote the set of all these constants. We use $\phi[x \rightarrow \alpha]$ to denote the formula obtained by replacing all free occurrences of variable x in $\phi$ with the term $\alpha$. A (\mbox{3-valued}) \textit{MKNF structure} is a triple $(I, \M, \N)$ where $I$ is a (two-valued first-order) interpretation and $\M = \langle M, M_1 \rangle$ and $\N = \langle N, N_1 \rangle$ are pairs of sets of first-order interpretations such that $M \supseteq M_1$ and $N \supseteq N_1$. Using $\phi$ and $\sigma$ to denote MKNF formulas, the evaluation of an MKNF structure is defined as follows: \begin{align*} &(I, \M, \N)({p(t_1, \dots ,~t_n)}) \define \left\{\begin{array}{ll} \tt & \textrm{iff } p(t_1, \dots,~t_n) \textrm{ is \boxed{\textrm{true}} in } I \\ \ff & \textrm{iff } p(t_1, \dots,~t_n) \textrm{ is \boxed{\textrm{false}} in } I \\ \end{array}\right. \\ &(I, \M, \N)({\neg \phi}) \define \left\{\begin{array}{ll} \tt & \textrm{iff } (I, \M, \N)({\phi}) = \ff \\ \uu & \textrm{iff } (I, \M, \N)({\phi}) = \uu \\ \ff & \textrm{iff } (I, \M, \N)({\phi}) = \tt \\ \end{array}\right. \\ &(I, \M, \N)({\exists x, \phi}) \define max\{(I, \M, \N)({\phi[\alpha \rightarrow x]}) ~|~\alpha \in \Delta\} \\ &(I, \M, \N)({\forall x, \phi}) \define min\{(I, \M, \N)({\phi[\alpha \rightarrow x]}) ~|~\alpha \in \Delta\} \\ &(I, \M, \N)({\phi \land \sigma}) \define min((I, \M, \N)({\phi}), (I, \M, \N)({\sigma})) \\ &(I, \M, \N)({\phi \lor \sigma}) \define max((I, \M, \N)({\phi}), (I, \M, \N)({\sigma})) \\ &(I, \M, \N)({\phi \subset \sigma}) \define \left\{ \begin{array}{ll} \tt & \textit{iff }\vspace{0.3em} (I, \M, \N)({\phi}) \geq (I, \M, \N)({\sigma}) \\ \ff & \textrm{otherwise} \end{array}\right.\\ &(I, \M, \N)({\bfK \phi}) \define \left\{\begin{array}{ll} \tt & \textrm{iff } (J, \MM, \N)({\phi}) = \tt \textrm{ \boxedt{for all} } J \in M \\ \ff & \textrm{iff } (J, \MM, \N)({\phi}) = \ff \textrm{ \boxedt{for some} } J \in M_1 \\ \uu & \textrm{otherwise} \end{array}\right. \\ &(I, \M, \N)({\Not \phi}) \define \left\{\begin{array}{ll} \tt & \textrm{iff } (J, \M, \NN)({\phi}) = \ff \textrm{ \boxedt{for some} } J \in N_1 \\ \ff & \textrm{iff } (J, \M, \NN)({\phi}) = \tt \textrm{ \boxedt{for all} } J \in N \\ \uu & \textrm{otherwise} \end{array}\right. \end{align*} While this logic captures many nonmonotonic semantics, we restrict our focus to hybrid MKNF Knowledge bases, a syntactic restriction that captures combining answer set programs with ontologies. An (MKNF) program $\P$ is a set of (MKNF) rules. A rule $r$ is written as follows: \begin{align*}\label{MKNFRules} \bfK h \leftarrow \bfK p_0,\dots,~\bfK p_j,~ \Not n_0,\dots,~\Not n_k. \end{align*} In the above, the atoms $h, p_0, n_0, \dots, p_j, $ and $n_k $ are function-free first-order atoms of the form $p(t_0, \dots,~t_n )$ where $p$ is a predicate and $t_0, \dots,~t_n$ are either constants or variables. We call an MKNF formula $\phi$ \textit{ground} if it does not contain variables. The corresponding MKNF formula $\pi(r)$ for a rule $r$ is as follows: \begin{align*} \pi(r) \define \forall \vec{x},~ \bfK h \subset \bfK p_0 \land \dots \land \bfK p_j \land \Not n_0 \land \dots \land \Not n_k \end{align*} where $\vec{x}$ is a vector of all variables appearing in the rule. We will use the following abbreviations: \begin{align*} &\pi(\P) \define \bigwedge\limits_{r \in \P} \pi(r)\\ &\head(r) = \bfK h \\ &\bodyp(r) = \{ \bfK p_0, \dots,~ \bfK p_j \} \\ &\bodyn(r) = \{ \Not n_0, \dots,~ \Not n_k \} \\ &\bfK(\bodyn(r)) = \{ \bfK a ~|~ \Not a \in \bodyn(r) \} \end{align*} An \textit{ontology} $\OO$ is a decidable description logic (DL) knowledge base translatable to first-order logic, we denote its translation to first-order logic with $\pi(\OO)$. We also assume that the ontology's entailment relation can be checked in polynomial time. A {\em normal hybrid MKNF knowledge base} (or knowledge base for short) $\KB = (\OO, \P)$ contains a program and an ontology. The semantics of a knowledge base corresponds to the MKNF formula $\pi(\KB) = \pi(\P) \land \bfK \pi(\O)$. We assume, without loss of generality \cite{knorrlocal2011}, that any given hybrid MKNF knowledge $\KB = (\OO, \P)$ base is ground, that is, $\P$, does not contain any variables\footnote{Not every knowledge base can be grounded. The prevalent class of groundable knowledge bases is the knowledge bases that are DL-safe~\cite{motikreconciling2010}.} This ensures that $\KB$ is decidable. A {\em (\mbox{3-valued}) MKNF interpretation} $(M, N)$ is a pair of sets of first-order interpretations where $\emptyset \subset N \subseteq M$. We say an MKNF interpretation $(M, N)$ \textit{satisfies} a knowledge base $\KB = (\OO, \P)$ if for each $I \in M$, $(I, \MN, \MN) (\pi (\KB)) = \tt$. \begin{definition} \label{model} A (\mbox{3-valued}) MKNF interpretation $(M, N)$ is a \textit{(\mbox{3-valued}) MKNF model} of a normal hybrid MKNF knowledge base $\KB$ if $(M, N)$ satisfies $\pi(\KB)$ and for every \mbox{3-valued} MKNF interpretation pair $(M', N')$ where $M \subseteq M'$, $N \subseteq N'$, $(M, N) \not= (M', N')$, and we have some $I \in M'$ s.t. $(I, \langle M', N' \rangle, \MN)(\pi(\KB)) \not= \tt$. \end{definition} It is often convenient to only deal with atoms that appear inside $\P$. We use $\KAK$ to denote the set of \Katoms{} that appear as either $\bfK a$ or $\Not a$ in the program and we use $\OBO{S}$ to the objective knowledge w.r.t.\ to a set of \Katoms{} $S$. \begin{align*} \KAK &\define \{ \bfK a ~|~ r \in \P,~ \bfK a \in \Big(\{ \head(r) \} \union \bodyp(r) \union \bfK(\bodyn(r)) \Big) \} \\ \OBO{S} &\define \big\{ \pi(\OO) \big\} \union \big\{ a ~|~ \bfK a \in S \} \end{align*} A \textit{$\bfK$-interpretation} $(T, P) \in \wp(\KAK)^2$ is a pair of sets of \Katoms{}\footnote{We use $\wp(S)$ to denote the powerset of $S$, i.e., $\wp(S) = \{ X ~|~ X \subseteq S \}$}. We say that $(T, P)$ is consistent if $T \subseteq P$. An MKNF interpretation pair $(M, N)$ uniquely {\em induces} a consistent \bfK-interpretation $(T, P)$ where for each $\bfK a \in \KAK$: \begin{align*} \bfK a \in \boxed{(T \intersect P)} \textrm{ if } \forall I \in M, \mmeval{\bfK a} &= \boxed{\tt}\\ \bfK a \not\in \boxed{\hspace{0.5cm} P \hspace{0.5cm}} \textrm{ if } \forall I \in M, \mmeval{\bfK a} &= \boxed{\ff}\\ \bfK a \in \boxed{(P \setminus T)} \textrm{ if } \forall I \in M, \mmeval{\bfK a} &= \boxed{\uu} \end{align*} We can acquire the set of false \Katoms{} by taking the complement of $P$, e.g., $F = \KAK \setminus P$ and $P = \KAK \setminus F$. When we use the letters $T$, $P$, and $F$, we always mean sets of true, possibly true, and false \Katoms{} respectively. We say that a \bfK-interpretation $(T, P)$ \textit{extends} to an MKNF interpretation $(M, N)$ if $(T, P)$ is consistent, $\OBO{P}$ is consistent, and \begin{align*} (M, N) = (\{ I ~|~ \OBO{T} \models I \}, \{ I ~|~ \OBO{P} \models I \}) \end{align*} This operation extends $(T, P)$ to the $\subseteq$-maximal MKNF interpretation that induces $(T, P)$. We comment on how the relation \textit{induces} and \textit{extends} are related. \begin{remark} Let $(M, N)$ be an MKNF {\bf model} of an MKNF knowledge base $\KB$. A \bfK-interpretation $(T, P)$ that extends to $(M, N)$ exists, is unique, and is the \bfK-interpretation induced by $(M, N)$. \end{remark} We say that an MKNF interpretation $(M, N)$ \textit{weakly induces} a {\bfK-interpretation} $(T, P)$ if $(M, N)$ induces a {\bfK-interpretation} $(T^*, P^*)$ where $T \subseteq T^*$ and $P^* \subseteq P$. Similarly, a {\bfK-interpretation} \textit{weakly extends} to an MKNF interpretation $(M, N)$ if there exists an interpretation $(T^*, P^*)$ that extends to $(M, N)$ such that $T \subseteq T^*$, $P^* \subseteq P$. Intuitively, we are leveraging the knowledge ordering $\uu < \tt$ and $\uu < \ff$. A \bfK-interpretation is weakly induced by an MKNF interpretation if that MKNF interpretation induces a \bfK-interpretation that ``knows more'' than the original \bfK-interpretation. There are MKNF interpretations for which no \bfK-interpretation extends to, however, these are of little interest; either $\OBO{P}$ is inconsistent or $(M, N)$ is not maximal w.r.t. atoms that do not appear in $\KAK$. Similarly, there exist \bfK-interpretations that extend to MKNF interpretations that do not induce them. If this is the case, then the \bfK-interpretation is missing some logical consequences of the ontology and this should be corrected. We define the class of \bfK-interpretations that excludes the undesirable \bfK-interpretations and MKNF interpretations from focus. \begin{definition}\label{saturated} A \bfK-interpretation $(T, P)$ of an MKNF knowledge base $\KB$ is {\em saturated} if it can be extended to an MKNF interpretation $(M, N)$ that induces $(T, P)$. Equivalently, a \bfK-interpretation is saturated iff $(T, P)$ and $\OBO{P}$ are consistent, $ \OBO{P} \not\models a~\textrm{for each } \bfK a \in (\KAK \setminus P)$ and $\OBO{T} \not\models a~\textrm{for each } \bfK a \in (\KAK \setminus T)$. \end{definition} \subsection{An Example Knowledge Base} Hybrid MKNF is equivalent to answer set semantics when the ontology is empty. The definition of an MKNF program given above is precisely the formulation of stable model semantics in the logic of MKNF~\cite{lifschitznonmonotonic1991}. We give an example of a knowledge base to demonstrate the combined reasoning of an answer set program with an ontology. \begin{example} Let $\KB = (\OO, \P)$ be the following knowledge base \begin{align*} \pi(\OO) &= \{ a \lor \neg b \} \\ (\textrm{The definition of } &\P \textrm{ follows})\\ \bfK a &\leftarrow \Not b\\ \bfK b &\leftarrow \Not a \end{align*} This knowledge base has two MKNF models \begin{align*} &\Big(\Big\{\{ a, b \}, \{ a, \neg b\}, \{ \neg a, \neg b \}\Big\}, \Big\{\{ a, b \} \Big\}\Big) \\ &\hspace{1cm}\textrm{ which induces the \bfK-interpretation } (\emptyset, \{ \bfK a, \bfK b \})\\ &(M, M) \textrm{ where } M = \Big\{\{ a, \neg b\}, \{ a, b \} \Big\}\\ &\hspace{1cm}\textrm{ which induces the \bfK-interpretation } (\{ \bfK a \}, \{ \bfK a \}) \end{align*} Above we have the answer set program $\P$ that, without $\OO$, admits three partial stable models. The ontology $\OO$ encodes an exclusive choice between the atoms $a$ and $b$. The program allows for both $a$ and $b$ to be undefined. The use of the ontology here is effectively a filter that removes all interpretations where $a$ is false but $b$ is true. The mixing of negation as failure and classical negation is not always straightforward. For example \begin{align*} \pi(\OO) &= \{ a \lor b \} \\ \P &= \emptyset \end{align*} The above admits just one MKNF model \begin{align*} &\big(M, M \big) \textrm{ where } M = \Big\{ \{ a, \neg b \}, \{ \neg a, b \}, \{ a, b \} \Big\}\\ &\hspace{1cm}\textrm{ which induces the \bfK-interpretation } (\emptyset, \emptyset) \end{align*} From the perspective of $\P$, which is only concerned with \bfK-interpretations, all atoms are false. However, the interpretation $\{ \neg a, \neg b \}$ is absent from the model which ensures that $\O$ is still satisfied. Recall that $\pi(\KB) = \bfK (a \lor b)$. \end{example} \bibliographystyle{plain} \bibliography{refs} \end{document}