Abduction Algorithm for First-Order Logic Reasoning Frameworks
Total Page:16
File Type:pdf, Size:1020Kb
Abduction Algorithm for First-Order Logic Reasoning Frameworks Andre´ de Almeida Tavares Cruz de Carvalho Thesis to obtain the Master of Science Degree in Mathematics and Applications Advisor: Prof. Dr. Jaime Ramos Examination Committee Chairperson: Prof. Dr. Cristina Sernadas Advisor: Prof. Dr. Jaime Ramos Member of the Committee: Prof. Dr. Francisco Miguel Dion´ısio June 2020 Acknowledgments I want to thank my family and friends, who helped me to overcome many issues that emerged throughout my personal and academic life. Without them, this project would not be possible. I also want to thank professor Cristina Sernadas and professor Jaime Ramos for all the help they provided during this entire process, whether regarding theoretical and practical advise or other tips concerning my academic life. i Abstract Abduction is a process through which we can formulate hypotheses that justify a set of observed facts, using a background theory as a basis. Eventhough the process used to formulate these hypotheses may vary, the innerent advantages are universal. It approaches real life problems within fields like medicine and criminality, while maintaining their usefulness within more theoretical subjects, like fibring of logic proof systems. There are, however, some setbacks, such as the time complexity associated with these algorithms, and the expressive power of the formulas used. In this thesis, we tackle this last issue. We study the notions of consequence system and of proof system, as well as provide relevant ex- amples of these systems. We formalize some theoretical concepts regarding the Resolution principle, including refutation completeness and soundness. We then extend these concepts to First-Order Logic. This representation of logic system was chosen for three main reasons: to maintain a certain degree of uniformity throughout the entire thesis; to allow a connection between abduction and the fibring of heterogeneous proof systems; to provide a simple and straighforward manner in which to represent the logic systems needed to demonstrate some important results. Equipped with these theoretical re- sults, we formalize and implement an abduction algorithm for First-Order Logic formulas in Mathematica, based on an already existing algorithm. We explore the applications of this algorithm regarding some pratical issues and some theoretical notions. Namely, since this new algorithm accepts formulas not only contained within Description Logic, but also First-Order Logic, it gives way to a better representation of concrete problems, and consequently to a better chance of obtaining correct answers. More, it gives way to the automatization of the fibring of proof systems, through its application to the computation of an abduction function for proof systems. Keywords: Consequence System, Proof System, Abduction Algorithm, TCHF Reasoning Framework, Resolution iii Resumo Abduc¸ao˜ e´ um processo atraves´ do qual podemos formular hipoteses´ que justificam um conjunto de fac- tos observados, usando como base uma teoria. Apesar do processo de formulac¸ao˜ destas hipoteses´ poder variar, as vantagens inerentes sao˜ universais. Este processo aborda assuntos reais relaciona- dos com varios´ campos, como a medicina e a criminalidade, mantendo a sua utilidade em temas mais teoricos,´ como e´ o caso da combinac¸ao˜ de logicas.´ Apesar disto, existem alguns desvantagens, no- meadamente relativas a` complexidade temporal e ao poder expressivo das formulas´ utilizadas. Nesta tese, abordamos este ultimo´ problema. Estudamos as noc¸oes˜ de sistema de consequenciaˆ e de sistema de prova, apresentando tambem´ al- guns exemplos destes sistemas. Formalizamos alguns conceitos teoricos´ relacionados com o princ´ıpio da Resoluc¸ao,˜ incluindo a correc¸ao˜ e completude de refutac¸ao.˜ Estendemos depois este princ´ıpio a formulas´ de Primeira Ordem. Esta representac¸ao˜ de sistemas logicos´ foi escolhida devido a tresˆ fato- res: para manter um certo grau de uniformidade ao longo de todo o estudo; para permitir uma ligac¸ao˜ entre a abduc¸ao˜ e a combinac¸ao˜ de logicas´ heterogeneas;´ para termos acesso a um modo simples e direto para representar os sistema logicos´ necessarios´ para demonstrac¸oes˜ de alguns resultados im- portantes. Equipados com estes resultados teoricos´ e outros estudos, formalizamos e implementamos um algoritmo de abduc¸ao˜ para formulas´ de Primeira Ordem em Mathematica, baseado num algoritmo ja´ existente e num conceito estendido do princ´ıpio de Resoluc¸ao.˜ Exploramos as aplicac¸oes˜ deste algoritmo no que concerne a assuntos mais praticos´ e a assuntos mais teoricos.´ Nomeadamente, como este algoritmo aceita formulas´ nao˜ so´ contidas em Logica´ Des- critiva, mas tambem´ em Primeira Ordem, permite uma melhor representac¸ao˜ de problemas concretos e, consequentemente, uma maior probabilidade de as respostas obtidas serem corretas. Mais, permite uma automatizac¸ao˜ da combinac¸ao˜ de sistemas de prova, atraves´ da sua aplicac¸ao˜ do algoritmo a` determinac¸ao˜ de uma func¸ao˜ de abduc¸ao˜ de um sistema de prova. Keywords: sistemas de consequencia,ˆ sistemas de prova, combinac¸ao˜ de logicas,´ algoritmo de abduc¸ao,˜ estrutura de racioc´ınio TCHF, Resoluc¸ao˜ v Contents List of Tables xi List of Figures xiii 1 Introduction 1 1.1 Background and Motivation . .1 1.2 Goals and Achievements . .3 1.3 Literature Review . .4 1.4 Outline . .4 2 Basic Notions 7 2.1 Consequence Systems . .7 2.2 Hilbert Calculus Induced Consequence Systems . .9 2.3 Other Consequence Systems . 11 2.4 Proof Systems . 15 2.5 Hilbert Calculus Induced Proof Systems . 16 2.6 Relations between Proof Systems and Consequence Systems . 16 3 Abduction 19 4 Peirce’s Algorithm 21 4.1 Main Ideas and Input . 22 4.2 Selection Criterion . 23 4.3 Resolution Principle for PROP Formulas . 24 4.4 Final Algorithm . 28 5 Peirce’s FOL Algorithm 31 5.1 Main Ideas . 32 5.2 Preliminaries and Procedures . 32 5.2.1 Input . 33 5.2.2 CLAFOL Procedure . 34 5.2.3 ResolutionOP and MGUFIN Procedures . 38 Generalized Resolution Principle - GRP . 38 Unification Algorithm . 40 Refutation Soundness, Completeness and Decibility . 40 Optimizations . 44 5.2.4 Other Procedures . 45 5.3 Final Theoretical Considerations . 46 5.4 Implementation . 47 vii 5.4.1 Input . 47 5.4.2 CLAFOL Procedure Implementation . 47 Pre Translation . 48 Skolemization Translation . 48 CNF Translation . 49 Clausal Translation . 49 Final Procedure . 50 5.4.3 ResolutionOP Procedure Implementation . 51 Seq1 Procedure . 51 Seq2 Procedure . 51 MGUFIN Procedure . 52 Optimizations Procedures . 57 Final Procedure . 60 5.4.4 Hypotheses Formulation . 64 5.4.5 Implementation of Peirce’s FOL Algorithm . 65 6 Results Analysis 67 7 Other Applications 71 7.1 Proof Systems in FOL ...................................... 71 7.2 Fibring . 72 8 Conclusion 79 8.1 Achievements . 79 8.2 Future Work . 80 Bibliography 81 A TCHF Reasoning Frameworks #2 Tested and Summarized Results 85 A.1 TCHF Reasoning Frameworks #2 . 85 A.2 Summarized Results . 86 A.3 Example 14 . 87 B Logic Definitions 89 viii x List of Tables 6.1 Results obtained with PEIRCEFOL ................................ 68 A.1 Results obtained with PEIRCEFOL ................................ 86 B.1 Boolean Algebra for ^ and _ .................................. 89 B.2 Boolean Algebra for : ...................................... 89 xi List of Figures 1.1 Peirce’s Theory of Inquiry . .1 xiii Chapter 1 Introduction 1.1 Background and Motivation Abduction algorithms are procedures that formulate hypotheses that justify a set of observed facts, using a theory as a basis. They are based on the concept of abduction, in particular Logic-based abduction, first introduced in general terms by Charles Peirce as one of the components of his Theory of Inquiry [1]. This notion denotes a type of reasoning, different from inductive and deductive reasoning, that instead of starting by the hypotheses with the goal of reaching a conclusion, it starts with the conclusions in order to determine hypotheses. While in the field of mathematics this order of reasoning may not be very useful, since the answers obtained are always uncertain, in other fields, such as diagnosis, economics, automated planning and historical linguistics, it has proven to be very helpful. Figure 1.1: Peirce’s Theory of Inquiry With the evolution of computer studies, the inclusion of abduction reasoning within fields like com- puter science and artificial intelligence research has been an open problem within the scientific commu- nity. Many algorithms, like the ABox abduction for Description Logic described in [2] by Klarman et al., the CIFF procedure by Endriss et al. presented in [3], and the THEORIST logic programming system for First-Order Logic (without quantifiers), detailed by Poole in [4], have tried to simplify this process, while at the same time expanding the universe to which it can be applied. Several progresses have been made, in particular in more recent years. Namely, the complexity of the logic systems used has increased from simple Propositional Logic to more advanced Description Logic and First-Order Logic, and selection criteria, i.e. methods through which the best hypotheses are chosen, have been refined. However, the formalization of such complex algorithms has also presented its problems, namely in terms 1 of time and space complexity. According to the article by Eiter et al. [5], the complexity of an abduction algorithm depends on the selection criterion chosen to sort the hypotheses and on the types of formulas used. The most efficient