Automated Reasoning Systems

Similar documents
Introduction to Logic Programming

What is a Logic Program. Introduction to Logic Programming. Introductory Examples. Introductory Examples. Foundations, First-Order Language

Lecture 4: January 12, 2015

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

UNIT 14C The Limits of Computing: Non computable Functions. Problem Classifications

Chapter 3. Set Theory. 3.1 What is a Set?

Data types for mcrl2

Logical reasoning systems

Discrete Mathematics Lecture 4. Harper Langston New York University

Knowledge & Reasoning

Resolution (14A) Young W. Lim 6/14/14

What is the study of logic?

First-Order Logic (FOL)

Lecture 7: January 15, 2014

COMP Logic for Computer Scientists. Lecture 17

THE PREDICATE CALCULUS

CS 561: Artificial Intelligence

First Order Predicate Logic CIS 32

The Prototype Verification System PVS

Logic (or Declarative) Programming Foundations: Prolog. Overview [1]

Programming Languages Third Edition

Lee Pike. June 3, 2005

This Lecture. We will first introduce some basic set theory before we do counting. Basic Definitions. Operations on Sets.

CSC 501 Semantics of Programming Languages

COMP4418 Knowledge Representation and Reasoning

Part I Logic programming paradigm

Formal Predicate Calculus. Michael Meyling

Logic Programming. Efficiency Issues. Temur Kutsia

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

Knowledge Representation. What is knowledge representation?

CS 4700: Artificial Intelligence

CSE 311: Foundations of Computing. Lecture 8: Predicate Logic Proofs

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

CSC Discrete Math I, Spring Sets

First-Order Predicate Logic. CSCI 5582, Fall 2007

CS 321 Programming Languages and Compilers. Prolog

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

Higher-Order Logic. Specification and Verification with Higher-Order Logic

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Software Paradigms (Lesson 6) Logic Programming

Stacks. Chapter 5. Copyright 2012 by Pearson Education, Inc. All rights reserved

Fuzzy Reasoning. Outline

6.034 Notes: Section 10.1

Prolog. Reading: Sethi, Chapter 11. Overview. Predicate Calculus. Substitution and Unication. Introduction to Prolog. Prolog Inference Rules

Notes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions

Logic and its Applications

CIS 771: Software Specifications. Lecture: Alloy Logic (part D)

Operators (2A) Young Won Lim 10/5/13

Introduction to dependent types in Coq

An Introduction to Programming and Proving in Agda (incomplete draft)

CITS2211 Discrete Structures Logic

Logic Programming. Manipulating Programs. Temur Kutsia

Propositional Logic. Andreas Klappenecker

On Agda JAIST/AIST WS CVS/AIST Yoshiki Kinoshita, Yoriyuki Yamagata. Agenda

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Code No: R Set No. 1

Advanced Logic and Functional Programming

Formal Specification: Z Notation. CITS5501 Software Testing and Quality Assurance

Mixed Integer Linear Programming

Propositional Logic. Part I

Sub: EM-III (14MA301) Section: A & B Date: 13/07/17 One Mark Questions: 1. a) Write the iterative formula to compute 3 N by Newton s method.

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

Formal Languages and Automata Theory, SS Project (due Week 14)

Logicographic Symbols: A New Feature in Theorema

LOGIC AND DISCRETE MATHEMATICS

CS422 - Programming Language Design

SOFTWARE ENGINEERING DESIGN I

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript

COMP 9416, session 1, 2006 p. 1. Datalog. COMP 9416, session 1, 2006

Warm-Up Problem. Let L be the language consisting of as constant symbols, as a function symbol and as a predicate symbol. Give an interpretation where

Bliksem 1.10 User Manual

Summary of Course Coverage

CS 512, Spring 2017: Take-Home End-of-Term Examination

Why Types Matter. Zheng Gao CREST, UCL

Query formalisms for relational model relational calculus

Scheme Tutorial. Introduction. The Structure of Scheme Programs. Syntax

Multi Domain Logic and its Applications to SAT

Logic Languages. Hwansoo Han

Module 7. Knowledge Representation and Logic (Rule based Systems) Version 2 CSE IIT, Kharagpur

Stack Applications. Lecture 27 Sections Robb T. Koether. Hampden-Sydney College. Wed, Mar 29, 2017

Relational Databases

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried

This book is licensed under a Creative Commons Attribution 3.0 License

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

CSE20: Discrete Mathematics

Typed Lambda Calculus

Argonne National Laboratory 9700 South Cass Avenue Argonne, IL ANL/MCS-TM-263. William McCune. Mathematics and Computer Science Division

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Lecture Notes 15 Number systems and logic CSS Data Structures and Object-Oriented Programming Professor Clark F. Olson

Predicate Logic CHAPTER What This Chapter Is About

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

Set 7: Predicate logic Chapter 8 R&N. ICS 271 Fall 2015

In Praise of Impredicativity: A Contribution to the Formalisation of Meta-Programming

Data Structure using C++ Lecture 04. Data Structures and algorithm analysis in C++ Chapter , 3.2, 3.2.1

PdOd Kev Events I Re-world war I1 rwa

Introductory logic and sets for Computer scientists

15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried

Mathematical Logic Part Two

Transcription:

Automated Reasoning Systems Resolution Theorem Proving: Prover9 Temur Kutsia RISC, Johannes Kepler University of Linz, Austria kutsia@risc.uni-linz.ac.at May 11, 2011 Prover9 Automated theorem prover from the Argonne group Successor of Otter Author: Bill McCune Theory: First-order logic with equality Inference rules: Based on resolution and paramodulation Main Applications: In abstract algebra and formal logic Implemented in C. Web page: http://www.cs.unm.edu/ mccune/prover9/

Running Prover9 1. Prepare the input file containing the logical specification of a conjecture and the search parameters. 2. Issue a command that runs Prover9 on the input file and produces an output file. 3. Look at the output. 4. maybe run Prover9 again with different search parameters. How to Run Prover9 From the command line: Run: prover9 -f inputfile or prover9 -f inputfile > outputfile or prover9 < inputfile or prover9 < inputfile > outputfile There can be several input files, e.g., prover9 -f file1... filen > outputfile Time limit can be specified from the command line: prover9 -t 10 -f inputfile > outputfile Using GUI.

Syntax Ordinary symbols: made from the characters a-z, A-Z, 0-9, $, and _. Special symbols: made from the special characters: {+-*/\^<>= ~?@&!# ;. Quoted symbols: any string enclosed in double quotes. Special characters can not be mixed with the others to make symbols, unless quoted symbols are formed. Syntax Meaning Connective negation - (-p) disjunction (p q r) conjunction & (p & q & r) implication -> (p -> q) backward implic. <- (p <- q) equivalence <-> (p <-> q) universal quant. all (all x all y p(x,y)) existential quant. exists (exists x exists y p(x,y)) true $T false $F equality = (a = b) negated equality!= (a!= b)

Syntax Symbols are assigned precedences. Infix, prefix, and postfix declarations are used. All that helps to avoid excessive use of parentheses. Details: http://www.cs.unm.edu/ mccune/prover9/manual/2009-11a/syntax.html#declarations For instance, terms involving +,* and binary - can be written in infix notation: a+b, a*b, a-b. Syntax Prover9 input file: A sequence of lists and commands. Lists (of formulas or clauses) can be used to declare, for instance, which formulas or clauses are assumptions and which ones are goals. Commands can be used, for instance, to set certain options. The order is largely irrelevant, except for some special cases.

Input File assign(max_seconds, 30). % Is Socrates mortal? formulas(assumptions). all x (man(x) -> mortal(x)). man(socrates). formulas(goals). mortal(socrates). Input File assign(max_seconds, 30). formulas(usable). all x (man(x) -> mortal(x)). man(socrates). formulas(sos). -mortal(socrates).

Input File assign(max_seconds, 30). formulas(sos). all x (man(x) -> mortal(x)). man(socrates). -mortal(socrates). Input File assign(max_seconds, 30). % Is Socrates mortal? clauses(assumptions). - man(x) mortal(x). man(socrates). formulas(goals). mortal(socrates).

Distinction Between Clauses and Formulas Formulas can have any of the logic connectives, and all variables are explicitly quantified. Formulas go into lists that start with formulas(list_name). Clauses are simple disjunctions in which all variables are implicitly universally quantified. Clauses go into lists that start with clauses(list_name). Clauses without variables are also formulas, so they can go into either kind of list. (An exception: clauses can have attributes, and formulas cannot.) Because variables in clauses are not explicitly quantified, a rule is needed for distinguishing variables from constants in clauses (see terms below). No such rule is needed for formulas. Prover9 s inference rules operate on clauses. If formulas are input, Prover9 immediately translates them into clauses. Mail Loop: Given Clause Algorithm Operates on the sos and usable lists. While the sos list is not empty: 1. Select a given clause from sos and move it to the usable list; 2. Infer new clauses using the inference rules in effect; each new clause must have the given clause as one of its parents and members of the usable list as its other parents; 3. Process each new clause; 4. Append new clauses that pass the retention tests to the sos list. end of while loop.

Input File Barbers paradox: There is a town with just one male barber. Every man in the town keeps himself clean-shaven. Some shave themselves, some are shaved by the barber. The barber shaves all and only those men in town who do not shave themselves. Does the barber shave himself? Input File Barbers paradox: There is a town with just one male barber. Every man in the town keeps himself clean-shaven. Some shave themselves, some are shaved by the barber. The barber shaves all and only those men in town who do not shave themselves. Does the barber shave himself? formulas(goals). exists x (barber(x) & (all y (-shaves(y,y) <-> shaves(x,y)))).

Run Prover9 on s Assumption : Assumption : Goal : x y Q(x) P(y, y). x y P(x, b) Q(f (y, x)). x P(a, x). Assumption : x y z (x y) z = x (y z). Assumption : x x 1 = x. Assumption : x x x 1 = 1. Assumption : x x x = 1. Goal : x y x y = y x.