Propositional Logic Language

Similar documents
3 Propositional Logic

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Propositional Logic: Models and Proofs

Logic: Propositional Logic (Part I)

Part 1: Propositional Logic

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Chapter 11: Automated Proof Systems (1)

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Chapter 11: Automated Proof Systems

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Propositional and Predicate Logic - V

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Tecniche di Verifica. Introduction to Propositional Logic

02 Propositional Logic

Language of Propositional Logic

Inference in Propositional Logic

Advanced Topics in LP and FP

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Warm-Up Problem. Is the following true or false? 1/35

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

2.2: Logical Equivalence: The Laws of Logic

Foundations of Artificial Intelligence

Propositional logic (revision) & semantic entailment. p. 1/34


2. The Logic of Compound Statements Summary. Aaron Tan August 2017

MAI0203 Lecture 7: Inference and Predicate Calculus

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Natural Deduction for Propositional Logic

185.A09 Advanced Mathematical Logic

Propositional Logic Sequent Calculus

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

LOGIC PROPOSITIONAL REASONING

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Deductive Systems. Lecture - 3

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

Propositional and Predicate Logic. jean/gbooks/logic.html

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

Introduction to Metalogic

CSC Discrete Math I, Spring Propositional Logic

INF3170 Logikk Spring Homework #8 For Friday, March 18

Learning Goals of CS245 Logic and Computation

A brief introduction to Logic. (slides from

Propositional Logic: Gentzen System, G

2.5.2 Basic CNF/DNF Transformation

Comp487/587 - Boolean Formulas

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

Chapter 4: Classical Propositional Semantics

cis32-ai lecture # 18 mon-3-apr-2006

Computation and Logic Definitions

Propositional Logic: Part II - Syntax & Proofs 0-0

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Review CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Overview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

Part 1: Propositional Logic

Infinitary Equilibrium Logic and Strong Equivalence

Marie Duží

Propositional Logic Part 1

Equational Logic. Chapter Syntax Terms and Term Algebras

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

Propositional and Predicate Logic - VII

A Tableau Calculus for Minimal Modal Model Generation

Mathematics for linguists

Introduction to Artificial Intelligence. Logical Agents

Classical Propositional Logic

Critical Reading of Optimization Methods for Logical Inference [1]

Propositional Logic: Review

Logic: First Order Logic

Propositional Logic: Evaluating the Formulas

Propositional Resolution

Classical Propositional Logic

Logical Agents (I) Instructor: Tsung-Che Chiang

Compound Propositions

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Propositional Resolution Introduction

Lecture 11: Measuring the Complexity of Proofs

Introduction to Intuitionistic Logic

Resolution In Propositional Logic

On the Complexity of the Reflected Logic of Proofs

Proving Completeness for Nested Sequent Calculi 1

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

Normal Forms of Propositional Logic

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Logic and Discrete Mathematics. Section 3.5 Propositional logical equivalence Negation of propositional formulae

UNIT-I: Propositional Logic

3 The Semantics of the Propositional Calculus

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

CS206 Lecture 03. Propositional Logic Proofs. Plan for Lecture 03. Axioms. Normal Forms

Transcription:

Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite or countably infinite set of nullary relation symbols A R = {p, q,...}, the set of connectives {,,,, } and the punctuation symbols ( and ). The language L of propositional logic formulas is defined as follows: Each relation symbol is a formula. If F and G are formulas, then F, (F G), (F G), (F (F G) are formulas. G) and 2 Propositional Logic 1

Notions, Remarks and an Example Nullary relation symbols are also called propositional variables, nullary predicate symbols and atoms. Literals are formulas of the form p or p. We define a precedence hierarchy as follows: > > > {, } >. A simple example: (p 1 p 2 ) (q 1 q 2 ). 2 Propositional Logic 2

Structural Induction and Recursion Theorem 2.1 (Principle of Structural Induction) Every formula of propositional logic has a certain property E provided that: 1. Basis step: Every propositional variable has property E. 2. Induction steps: If F has property E so does F. If F and G have property E so does F G, where {,,,, }. Theorem 2.2 (Principle of Structural Recursion) There is one, and only one, function h defined on the set of propositional formulas such that: 1. Basis step: The value of h is specified explicitly on propositional variables. 2. Recursion steps: The value of h on F is specified in terms of the value of h on F. The value of h on F G is specified in terms of the values of h on F and on G, where {,,,, }. 2 Propositional Logic 3

Subformulas The set of subformulas T (H) is the smallest set satisfying the following conditions: H T (H). If F T (H), then F T (H). If F G T (H), then F, G T (H), where {,,,, }. 2 Propositional Logic 4

Propositional Logic Semantics Goal: assign a meaning to formulas with the help of a function L {t, f}. Interpretation I: a total mapping A R {t, f}. Abbreviation: I A R with the understanding that I(p) = t iff p I. I models F, in symbols I = F : I = p iff I(p) = t (iff p I) I = F iff I = F I = F 1 F 2 iff I = F 1 and I = F 2 I = F 1 F 2 iff I = F 1 or I = F 2 I = F 1 F 2 iff I = F 1 or I = F 2 I = F 1 F 2 iff I = F 1 F 2 and I = F 2 F 1. 2 Propositional Logic 5

Connectives Unary connective: t f f t Binary connectives: t t t t t t t f f t f f f t f t t f f f f f t t 2 Propositional Logic 6

Models, Validity and More Notions An interpretation I for F is said to be a model for F iff I = F. Let F be a set of formulas. I is a model for F iff I is a model for each G F. F is said to be valid or a tautology iff for all I we find that I = F. F is said to be satisfiable iff there exists an I such that I = F. F is said to be falsifiable iff there exists an I such that I = F. F is said to be unsatisfiable iff for all I we find that I = F. 2 Propositional Logic 7

Logical Entailment A set of formulas F logically entails G (or G is a logical consequence of F or G is a theorem of F), in symbols F = G, iff each model for F is also a model for G. A satisfiable set of formulas together with all its theorems is said to be a theory. Truth tabling: {p q r} = p r? p q r q r p q r p r t t t t t t t t f f f f t f t f f t t f f f f f f t t t t t f t f f t t f f t f t t f f f f t t 2 Propositional Logic 8

Logical Consequence vs. Validity vs. Unsatisfiability Theorem 2.3: F {G} = H iff F = G H. {F 1,..., F n } = F iff {F 1,..., F n 1 } = F n F iff... iff = F 1 (F 2... (F n F )...). Logical consequence is related to validity. Abbreviation: = F = F. Theorem 2.4: F is valid iff F is unsatisfiable. Validity is related unsatisfiability. Logical consequence is related to unsatisfiability 2 Propositional Logic 9

Semantic Equivalence F G if for all interpretations I we find that I = F iff I = G. Some equivalences: (F F ) F (F F ) F idempotency (F G) (G F ) (F G) (G F ) commutativity ((F G) H) (F (G H)) ((F G) H) (F (G H)) associativity ((F G) F ) F ((F G) F ) F absorption (F (G H)) ((F G) (F H)) (F (G H)) ((F G) (F H)) distributivity 2 Propositional Logic 10

More Equivalences F F double negation (F G) ( F G) (F G) ( F G) de Morgan (F G) F, if F tautology (F G) G, if F tautology tautology (F G) G, if F unsatisfiable (F G) F, if F unsatisfiable unsatisfiability (F G) (F G) (G F ) equivalence (F G) ( F G) implication 2 Propositional Logic 11

The Replacement Theorem F [G]: formula F, in which the occurrences of the formula G are important. F [G/H]: formula obtained from F by replacing all occurrences of G by H. Theorem 2.5: If G H, then F [G] F [G/H]. 2 Propositional Logic 12

Normal Forms Negation normal form: the formula is built solely by literals, conjunctions and disjunctions. Conjunctive normal form: the formula has the form F 1... F n, n 0, where each of F 1,..., F n is a disjunction of literals. case n = 0: denoting a valid formula. Disjunctive normal form: the formula has the form F 1... F n, n 0, where each of F 1,..., F n is a conjunction of literals. case n = 0: [ ] denoting an unsatisfiable formula. Clause form: set notation of formulas in conjunctive normal form; Clauses: elements of these sets. Dual clause form: set notation of formulas in disjunctive normal form; Dual clauses: elements of these sets. 2 Propositional Logic 13

Normal Form Transformation Input A propositional logic formula F. Output A propositional logic formula G in conjunctive normal form which is equivalent to F. 1. Eliminate all equivalence signs using the equivalence law. 2. Eliminate all implication signs using the implication law. 3. Eliminate all negation signs except those in literals using the de Morgan and the double negation laws. 4. Distribute all disjunctions over conjunctions using the second distributivity, the commutativity and the associativity laws. 2 Propositional Logic 14

Normal Form Transformation - Example (p (q r)) s (p ( q r)) s by implication (p ( q r)) s by implication ( p ( q r)) s by de Morgan ( p ( q r)) s by de Morgan ( p (q r)) s by double negation (( p q) ( p r)) s by distributivity s (( p q) ( p r)) by commutativity (s ( p q)) (s ( p r) by distributivity (s p q) (s p r) by associativity 2 Propositional Logic 15

Clause Form Conjunctive normal form: Clause form: Unit clause: clause which contains only one literal. (L 11... L 1n1 )... (L m1... L mn m), {{L 11,..., L 1n1 },..., {L m1,..., L mn m}}. Horn clause: clause which contains at most one positive literal (L L 1... L n ). Goal clause: Horn clause which contains only negative literals ( L 1... L n ). Definite clause: Horn clause which contains a positive literal. Fact: definite unit clause. [ ]: denotes the empty clause. 2 Propositional Logic 16

Propositional Logic Programs Procedural vs. declarative reading of definite clauses. Definite propositional logic program F: set of definite clauses. Proposition 2.1: If I 1 and I 2 are models of F then so is I 1 I 2. There exists a least model M F of F. Theorem 2.6: Let F be a logic program. M F = {p F = p}. Meaning function: T F (I) = {p p p 1... p n F {p 1,..., p n } I}. T F 0 = T F (n + 1) = T F (T F n) for all n 0. T F admits a least fixed point lfp(t F ). Theorem 2.7: M F = lfp(t F ) = lub({t F n n N}). 2 Propositional Logic 17

Calculus Logic: A, L, =. Calculus: A, L, Γ, Π, where Γ is a set of formulas called axioms and Π is a set of inference rules. F F : inference relation defined by Γ and Π. Soundness: If F F then F = F. Completeness: If F = F then F F 2 Propositional Logic 18

Classification of Calculi A calculus is said to be negative if its axioms are unsatisfiable. positive if its axioms are valid, generating if theorems are derived from the axioms using the inference rules, analyzing if theorems are reduced to the axioms using the inference rules. 2 Propositional Logic 19

Natural Deduction Gentzen 1935: How to represent logical reasoning in mathematics? Calculus of natural deduction. Alphabet: propositional logic. [ ] denotes some unsatisfiable formula. denotes some valid formula. Language: propositional logic formulas. Axioms: { }. 2 Propositional Logic 20

Natural Deduction - Inference Rules Constant Rules: [ ] F Negation Rules: Introduction Rules for Binary Connectives: F F [ ] F. [ ] F F. [ ] F I F G F G I F. G F G G. F F G I F. G F G G. F F G Elimination Rules for Binary Connectives: E F G F F G G E F F G G G F G F E F F G G G F G F 2 Propositional Logic 21

Deductions and Proofs A deduction in the calculus of natural deduction is a sequence of formulas possibly enclosed in (open or closed) boxes such that each element is either the axiom, follows from earlier elements occurring in open boxes at this stage by one of the rules of inference or is a formula different from and does not follow by one of the rules of inference, in which case the formula is called assumption and a new box is opened. A proof of F in the calculus of natural deduction is a deduction in which all boxes are closed and F is the last element in the deduction. 2 Propositional Logic 22

Lemmas The lemmas: F F (F G) F G (F G) G F (F G) ( F G) represent the sequence of formulas: F F [ ] F (F G) F G (F G) [ ] G (F G) G F (F G) [ ] F (F G) ( F G) G F F (F G) [ ] ( F G) Lemmas shorten proofs, but enlarge the search space. 2 Propositional Logic 23

Natural Deduction - Soundness and Completeness Theorem 2.8: The calculus of natural deduction is sound and complete. Human readable proofs vs. machine generated proofs. Sequent calculus. Proof theory. 2 Propositional Logic 24

Sequent Calculus Sequent: F G, where F and G are multisets of formulas. Notation: {F1,..., F n } F1,..., F n. F {F } F, F. Inference rules: S 1... S n r S or S r 2 Propositional Logic 25

Sequent Calculus: Axiom, Cut and Structural Rules Axiom Cut H, F G, H ax F G, H F G H, F G cut Structural rules H, H, F G H, F G cl F G, H, H F G, H cr 2 Propositional Logic 26

Sequent Calculus: Logical Rules Rules for the left hand side Rules for the right hand side F G, H 1 H 2, F G (H 1 H 2 ), F G l H 1, F G, H 2 F G, (H 1 H 2 ) r H 1, H 2, F G (H 1 H 2 ), F G l F G, H 1 F G, H 2 r F G, (H 1 H 2 ) H 1, F G H 2, F G (H 1 H 2 ), F G l F G, H 1, H 2 F G, (H 1 H 2 ) r F G, H H, F G l H, F G F G, H r 2 Propositional Logic 27

Sequent Calculus: Soundness and Completeness A proof of the sequent S in the sequent calculus is defined as follows: An axiom of the form r is a proof of S. S If T 1,..., T n are proofs of S 1,..., S n respectively and the sequent calculus contains a rule of the form S 1... S n r, then T 1... T n r is a proof of S. S S Theorem 2.9: The propositional sequent calculus is sound and complete. Subformula property: all formulas occurring in the condition of a rule occur as subformulas in the conclusion of the rule. Only the cut rule violates this property. Gentzen s Hauptsatz : Cuts can be removed in sequent calculus proofs. 2 Propositional Logic 28

Resolution Let C 1 = {L, L 1,..., L n } and C 2 = { L, K 1,..., K m } be two clauses. Then is called a resolvent of C 1 and C 2. {K 1,..., K m, L 1,..., L n, } {C 1, C 2 } = {K 1,..., K m, L 1,..., L n, }. A deduction of C from F is a finite sequence C 1,..., C k = C of clauses such that C i, 1 i k, either is a clause from F or a resolvent of clauses preceding C i. A deduction of [ ] from F is called a refutation. Theorem 2.11 The resolution calculus for propositional logic is sound and complete. 2 Propositional Logic 29

Monotonicity A logic is monotonic iff F = F implies F F = F. Propositional logic is monotonic. A logic which obeys the law is not monotonic. for each atom p we find F = p iff p F. 2 Propositional Logic 30