Abstract
Modal logics have numerous applications in computational linguistics, artificial intelligence, rule-based reasoning, and, in general, alethic, deontic and epistemic contexts. Higher-order quantified modal logics additionally incorporate the expressiveness of higher-order formalisms and thereby provide a quite general reasoning framework. By exploiting this expressiveness, the Modal Embedding Tool (MET) allows to automatically encode higher-order modal logic problems into equivalent problems of classical logic, enabling the use of a broad variety of established reasoning tools. In this system description, the functionality and usage of MET as well as a suitable input syntax for flexible reasoning with modalities are presented.
Alexander Steen is partially supported by the Volkswagenstiftung (project CRAP).
Access provided by CONRICYT-eBooks. Download conference paper PDF
Similar content being viewed by others
Keywords
- Flexible Reasoning
- Rule-based Reasoning
- Modal Logic System
- Varying Domain Semantics
- Input Problem Statement
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
1 Introduction
Various powerful automated and interactive theorem proving systems (ATP and ITP, respectively) for first-order (FO) and higher-order (HO) logics have been developed over the past decades, including the first-order ATP E [1], the higher-order ATPs Satallax [2], LEO-II [3] and Leo-III [4], and the higher-order ITP Isabelle/HOL [5]. While many of these systems are meanwhile quite robust and mature, they often support reasoning in classical logics only. This is in contrast to the fact that non-classical logics have many topical applications in mathematics, computer science and beyond. In this work, we focus on the automation of quantified (multi-)modal logics [6] which can be fruitfully applied in the context of artificial intelligence, computational linguistics and rule-based reasoning. They also play an important role in various areas of philosophy, including ontology, (computer-)ethics, philosophy of mind and philosophy of science. Many challenging applications, however, as recently explored in metaphysics [7,8,9], require quantified and in particular higher-order quantified modal logics (HOMLs). But even for first-order non-classical logics only a small number of implemented systems is available to date, and the situation is even worse for higher-order quantified logics. In particular, the development of ATPs for HOMLs is still in its infancy, hence impeding more complex computer-assisted studies of relevant topics.
To overcome this situation, in this work we present the Modal Embedding Tool (MET for short) that bridges the above gap by enabling the employment of classical higher-order reasoning systems, including powerful HO ATPs, for reasoning in a broad variety of quantified modal logics. Recall that for quantified modal logics there exist multiple different notions of semantics, most of which usually used in different application domains. The exact semantics of a given quantified modal logic can be regarded a product of multiple individual semantical parameters, including:
-
(i)
Modal axiomatization: What properties hold for each modality? The properties range from axiom scheme K alone to the strong assumptions of logic S5, and any intermediate system (cf. the modal logic cube [6]).
-
(ii)
Quantification semantics: What are the domains of quantified variables? Usual choices include so-called cumulative, decreasing, constant and varying domain semantics.
-
(iii)
Rigidity: Is the meaning of a symbol the same in every possible world? Possible choices include rigid and world-dependent constant symbols.
Also, there exist different choices for logical consequence relations, including at least so-called local and global consequence [6]. When taking all possible parameter combinations into account this amounts to more than 120 different HOMLs.
MET implements a shallow semantical embedding approach [10] in which formulas of modal logic are identified with specific terms of classical higher-order logic such that a notion of modal validity can be defined within HOL that coincides with the desired modal logic semantics. More concretely, a modal logic formulated in a suitable machine-readable syntax (cf. Figs. 2 and 3) is translated by MET to a problem statement in the de-facto standard TPTP THF syntax [11, 12] for HO ATP systems. The transformation process is thereby validity preserving and thus allows the use of common reasoning systems that do not support modal logic reasoning on their own. The process is visualized in Fig. 1. Although the here discussed approach involves an indirection over classical HOL, recent evaluations confirm that the reasoning effectivity of HO ATPs used in conjunction with MET are on a par with established modal logic reasoners [4]. Additionally, reasoning using MET is much more flexible than the employment of these special purpose systems as it allows a completely free choice of all relevant semantical parameters (supporting every existent normal modal logic) whereas native modal logic reasoners are limited to a small subset of modal logic systems and usually have fixed choices for quantification semantics, symbol rigidity and consequence. In fact, even more general modal logics are supported via a fine-grained control over the properties of individual quantification domains, modal operators, etc [13].
Whereas earlier work focused on the theoretical foundations [10], and the development of the automatic embedding procedure itself [13], in this paper, we present the prover-independent tool MET and its practical employment in relevant application scenarios.
Higher-Order Modal Logics. HOMLs as addressed here are extensions of HOL [14]. HOL provides \(\lambda \)-abstraction as an elegant means to denote unnamed functions, predicates and sets (by their characteristic functions). HOML, in turn, augments HOL with a set of modal operators \(\square ^i\), \(i \in I\), for some index set I, and is equipped with a suitable combination of HOL semantics and a Kripke-style modal semantics [13]. In our approach an adequate notion of Henkin semantics for both HOML and HOL is assumed [10, 13].
2 A Syntax for HOML and Its Semantics
A standard ASCII-based machine-readable representation of HOL problems for ATP systems is given by the TPTP THF dialect [12]. This syntax is supported by most of the current HOL reasoners, including all HO systems mentioned in the beginning of Sect. 1. Since the syntax of HOML is a conservative extension of that of classical HOL, the THF representation language can as well easily be augmented by introducing the modal operators and as new primitive connectives, representing the modal connectives \(\square \) and \(\Diamond \), respectively (in a mono-modal settings). For multi-modal logics, there exist analogous operators that are additionally given an index as first argument and the formula as second argument. The remaining syntax coincides with standard THF and is described in the literature [12].
As sketched in Sect. 1, there is no single semantics of quantified modal logics. As a consequence, there is additional need for explicitly stating the semantical setting in which a problem is to be assessed by a reasoning system. This is realized in the here proposed syntax by including a meta-logical specification into the problem header. Such a specification statement is displayed in Fig. 2: In this logic specification, the identifiers , and specify the exact semantical settings for the rigidity of constant symbols, the quantification semantics and the consequence relation, respectively. Finally, specifies the properties of the modal connectives by means of fixed modal logic system names or, alternatively, a list of individual modal axiom schemes. The valid parameter values are given in Table 1.
The remaining placeholders of Fig. 2, \(\langle \mathsf {name} \rangle \), \(\langle \mathsf {role} \rangle \) and \(\langle \mathsf {formula} \rangle \), are standard and given by the TPTP language definition [11] to which we refer to for brevity. The semantics specification format presented in this paper is work-in-progress and stems from an ongoing TPTP language extension proposal.Footnote 1
3 Application Examples
In this section, the practical employment of MET for reasoning with relevant non-trivial problem statements is discussed. The first application example, a formulation of the wise men puzzle, incorporates the use of multiple inter-related modality operators and quantification beyond first-order. The second example focuses on the use of logic specification statements within the problem and illustrates the flexibility of the here presented reasoning approach.
3.1 Case Study: The Wise Men Puzzle
A classical example dealing with knowledge between agents and implicit knowledge transfer is the wise men puzzle (also known in a variation as muddy forehead puzzle). Epistemic logic, the logic about knowledge, can be interpreted as a form of multi-modal logic, were the modality operators represent knowing and are indexed with an agent’s identifier from an index set I (referring to the particular agent whose knowledge it addresses). As an example, the sentence “agent a knows \(\phi \)”, for an agent \(a \in I\), can be stated as \(\square ^a \phi \). While dealing with common knowledge scenarios, often an additional artificial agent (sometimes referred to as fool) is defined for allowing statements such as “everybody knows \(\phi \)”, represented by \(\square ^{\text {fool}} \phi \).
A formulation of the wise men puzzle is given in Fig. 3. In the logic specification, the modalities (including the common knowledge modality) are given an S5 axiomatization to capture the usual assumptions about knowledge. Additionally, a varying domain semantics is used for this experiment. The modal operators \(\square ^a\) for some agent \(a \ne \mathrm {fool} \in I\) are related to common knowledge \(\square ^{\mathrm {fool}}\) using so-called bridge-rules stating that everything that is common knowledge is also known by the individual agents (cf. ll. 16–30). The common knowledge fact that the first two agents do not know their hat color is given by two axioms (ll. 33–34) and finally the conjecture that the third agent now knows its hat color is given by the conjecture (l. 37). The wise men problem in the presented formulation can be solved using MET in conjunction with Leo-III as reasoner back end in under 5s, cf. Appendix A for a detailed display of the tools usage.
3.2 Case Study: Experiments with Semantical Variations
In this case study, we focus on the flexibility the logic specification within a problem provides for experiments in different semantical settings. Figure 4 displays an example modal logic formula that is an instance of a corollary of Becker’s postulate [15]. It essentially expresses that everything that is possibly necessary it, in fact, necessary. Since this formula is obviously debatable, one might want to explicitly include or exclude this fact from a logical system. It is known from the literature, that Becker’s postulate is indeed valid in S5 modal logics but not in any weaker logic systems. Even without this knowledge, the MET allows to experimentally reproduce these results with only simple modification of the logic specification statements. To that end, each semantical setting can be formulated as logic specification and then transformed by MET to HOL problems. These HOL problems are then in turn given to HO reasoning systems for verifying or refuting the conjecture.
In the example of Becker’s postulate, the higher-order ATP system Leo-III and the counter-model finder Nitpick [16] verify the above claim. The systems produce proofs resp. explicit, finite, counter-models of the validity the conjecture in each modal logic system. The results of these experiments are summarized in Table 2. It can be seen that, for every modal logic system, the combination of both reasoners successfully assess the conjecture and yield the expected results. Each invocation of the reasoning systems (including the pre-processing by MET) takes less than 1 s. Note that both systems are in a sense complementary, i.e. theorem proving systems are usually stronger for proving the validity of a conjecture while counter-model finders focus on counter-satisfiability. Using both systems, positive and negative results can be established as desired.
The example of Becker’s postulate is chosen for demonstrative purposes. Similarly interesting formulas for certain modal logics such as Barcan’s formula (or its converse) can be analyzed analogously using MET [13]. In a more general setting, the semantical flexibility of the here presented approach allows for an empirical assessment of a formal system’s adequateness for a specific application; and to explore further, possibly unintended, consequences of a given formulation.
4 Summary and Further Work
In this work, a self-contained syntax for formulating higher-order modal logic problems was sketched that is used as input format to the Modal Embedding Tool. This stand-alone tool acts as external pre-processor for HO reasoning systems and emits for a given input problem statement an equivalent (wrt. validity) HOL problem formulated in standard THF syntax. MET is implemented in Java and freely available at GitHub under BSD-3 license.Footnote 2 The higher-order ATP system Leo-III additionally incorporates a version of MET for automatically embedding modal logic problems without any need for external pre-processing.
When used in conjunction with further powerful HO ATP systems, MET has many topical applications for reasoning in knowledge bases, legal reasoning, smart contracts and, more generally, in alethic, epistemic and deontic contexts. An adaption of MET for accepting RuleML input syntax [17], OWL [18] or further languages for rule-based reasoning is, thanks to the flexible underlying embedding approach, straight-forward and current work-in-progress [19]. The MET can also be extended to serve as a translation tool between these different representation formats.
Notes
- 1.
See proposal “Logic Specification Format” of the TPTP platform for more details.
- 2.
See github.com/leoprover/embed_modal for details and further instructions.
References
Schulz, S.: E – a brainiac theorem prover. AI Commun. 15(2,3), 111–126 (2002)
Brown, C.E.: Satallax: An automatic higher-order prover. In: Gramlich, B., Miller, D., Sattler, U. (eds.) IJCAR 2012. LNCS (LNAI), vol. 7364, pp. 111–117. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31365-3_11
Benzmüller, C., Sultana, N., Paulson, L.C., Theiß, F.: The higher-order prover LEO-II. J. Autom. Reason. 55(4), 389–404 (2015)
Steen, A., Benzmüller, C.: The higher-order prover Leo-III. In: Galmiche, D., Schulz, S., Sebastiani, R. (eds.) IJCAR 2018. LNAI, vol. 10900, pp. 108–116. Springer, Heidelberg (2018)
Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL: A Proof Assistant for Higher-Order Logic. Lecture Notes in Computer Science, vol. 2283. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45949-9
Blackburn, P., van Benthem, J.F., Wolter, F.: Handbook of Modal Logic, vol. 3. Elsevier, Amsterdam (2006)
Benzmüller, C., Woltzenlogel Paleo, B.: The inconsistency in Gödel’s ontological argument: a success story for AI in metaphysics. In: Kambhampati, S. (ed.) IJCAI 2016, vol. 1–3, pp. 936–942. AAAI Press (2016). (Acceptance rate \(\le 25\%\))
Benzmüller, C., Weber, L., Woltzenlogel Paleo, B.: Computer-assisted analysis of the Anderson-Hájek controversy. Logica Universalis 11(1), 139–151 (2017)
Fuenmayor, D., Benzmüller, C.: Types, Tableaus and Gödel’s God in Isabelle/HOL. Archive of Formal Proofs (2017). This publication is machine verified with Isabelle/HOL, but only mildly human reviewed
Benzmüller, C., Paulson, L.: Quantified multimodal logics in simple type theory. Logica Universalis 7(1), 7–20 (2013). (Special Issue on Multimodal Logics)
Sutcliffe, G.: The TPTP problem library and associated infrastructure. From CNF to TH0, TPTP v6.4.0. J. Autom. Reason. 59(4), 483–502 (2017)
Sutcliffe, G., Benzmüller, C.: Automated reasoning in higher-order logic using the TPTP THF infrastructure. J. Formaliz. Reason. 3(1), 1–27 (2010)
Gleißner, T., Steen, A., Benzmüller, C.: Theorem provers for every normal modal logic. In: Eiter, T., Sands, D. (eds.) LPAR-21. EPiC Series in Computing, Maun, Botswana, vol. 46, pp. 14–30. EasyChair (2017)
Andrews, P.: Church’s type theory. In: Zalta, E.N. (ed.) The Stanford Encyclopedia of Philosophy. Stanford University, Metaphysics Research Lab (2014)
Becker, O.: Zur Logik der Modalitäten. Max Niemeyer Verlag (1930)
Blanchette, J.C., Nipkow, T.: Nitpick: A counterexample generator for higher-order logic based on a relational model finder. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 131–146. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14052-5_11
Athan, T., Boley, H., Paschke, A.: Ruleml 1.02: Deliberation, reaction and consumer families. In: Bassiliades, N., et al. (eds.) Proceedings of the RuleML 2015 Challenge, the Special Track on Rule-based Recommender Systems for the Web of Data, the Special Industry Track and the RuleML 2015 Doctoral Consortium hosted by the 9th International Web Rule Symposium (RuleML 2015). CEUR Workshop Proceedings, vol. 1417. CEUR-WS.org (2015)
Cao, S.T., Nguyen, L.A., Szalas, A.: The web ontology rule language OWL 2 RL\(^{+}\) and its extensions. Trans. Comput. Collect. Intell. 13, 152–175 (2014)
Boley, H., Benzmüller, C., Luan, M., Sha, Z.: Translating higher-order modal logic from RuleML to TPTP. In Giurca, A., et al. (eds.) Proceedings of the RuleML 2016 Challenge, the Special Industry Track and the RuleML 2016 Doctoral Consortium hosted by the 10th International Web Rule Symposium (RuleML 2016). CEUR Workshop Proceedings, vol. 1620. CEUR-WS.org (2016)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
A Installation and Usage of MET
A Installation and Usage of MET
Acquisition and Installation
MET is freely available on GitHub (https://github.com/leoprover/embed_modal) under BSD-3 license. The most current release is always accessible under https://github.com/leoprover/embed_modal/releases/latest. To get it, simply download the source archive and extract it so some location.
After extraction, MET can be built using Make. Simply to the extracted directory s and run Make:
After building, there should be a directory , relative from the current directory. This directory contains the binary of MET. You will also find a JAR in the directory which you can use as a library for your own projects.
MET can optionally be installed by invoking
which copies the binary to the directory and adds it to your .
Usage
To execute MET, simply run the command (assuming you have installed MET) or run . For brevity, we assume that is available.
For the example of Becker’s postulate, running
will generate a new file that contains the embedded THF problem that is semantically equivalent to the modal problem of as given in Fig. 4 (the file is also contained in the distribution of MET in ). Now, any TPTP THF-compliant ATP system can be used, e.g. Leo-III can be invoked on the result:
Becker’s Postulate Embedded
The embedded file contains the following:
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Gleißner, T., Steen, A. (2018). The MET: The Art of Flexible Reasoning with Modalities. In: Benzmüller, C., Ricca, F., Parent, X., Roman, D. (eds) Rules and Reasoning. RuleML+RR 2018. Lecture Notes in Computer Science(), vol 11092. Springer, Cham. https://doi.org/10.1007/978-3-319-99906-7_19
Download citation
DOI: https://doi.org/10.1007/978-3-319-99906-7_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-99905-0
Online ISBN: 978-3-319-99906-7
eBook Packages: Computer ScienceComputer Science (R0)