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

Similar documents
02 Propositional Logic

Advanced Topics in LP and FP

Logic: Propositional Logic (Part I)

An Introduction to Modal Logic III

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

Propositional Logics and their Algebraic Equivalents

Propositional Dynamic Logic

Natural Deduction for Propositional Logic

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

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

Language of Propositional Logic

Logic for Computer Science - Week 4 Natural Deduction

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

Learning Goals of CS245 Logic and Computation

Classical Propositional Logic

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

Chapter 4: Classical Propositional Semantics

Introduction to Metalogic

Chapter 11: Automated Proof Systems

1. Propositional Calculus

Chapter 11: Automated Proof Systems (1)

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Basic Algebraic Logic

1. Propositional Calculus

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

On the Complexity of the Reflected Logic of Proofs

Modal Logic XX. Yanjing Wang

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

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Madhavan Mukund Chennai Mathematical Institute

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

Propositional and Predicate Logic - V

Propositional Logic Language

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

CHAPTER 11. Introduction to Intuitionistic Logic

3 Propositional Logic

Gödel s Completeness Theorem

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

Informal Statement Calculus

Propositional Logic: Deductive Proof & Natural Deduction Part 1

On Modal Logics of Partial Recursive Functions

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

MAI0203 Lecture 7: Inference and Predicate Calculus

CONTENTS. Appendix C: Gothic Alphabet 109

INF3170 Logikk Spring Homework #8 For Friday, March 18

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Formal (natural) deduction in propositional logic

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

Handout: Proof of the completeness theorem

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

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

Deductive Systems. Lecture - 3

AN EXTENSION OF THE PROBABILITY LOGIC LP P 2. Tatjana Stojanović 1, Ana Kaplarević-Mališić 1 and Zoran Ognjanović 2

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST

Truth-Functional Logic

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Mathematical Logic. Introduction to Reasoning and Automated Reasoning. Hilbert-style Propositional Reasoning. Chiara Ghidini. FBK-IRST, Trento, Italy

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

First Order Logic (FOL) 1 znj/dm2017

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

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

Propositional Logic: Models and Proofs

The Logic of Proofs, Semantically

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

Modal Logic: Exercises

Propositional Logic. CS 3234: Logic and Formal Systems. Martin Henz and Aquinas Hobor. August 26, Generated on Tuesday 31 August, 2010, 16:54

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Logic via Algebra. Sam Chong Tay. A Senior Exercise in Mathematics Kenyon College November 29, 2012

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

UNIT-I: Propositional Logic

1 Completeness Theorem for First Order Logic

Propositional Calculus - Soundness & Completeness of H

Marie Duží

ECE473 Lecture 15: Propositional Logic

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

An Introduction to Modal Logic V

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Kazimierz SWIRYDOWICZ UPPER PART OF THE LATTICE OF EXTENSIONS OF THE POSITIVE RELEVANT LOGIC R +

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

Introduction to Metalogic 1

First Order Logic: Syntax and Semantics

Logic: Propositional Logic Truth Tables

Rasiowa-Sikorski proof system for the non-fregean sentential logic SCI

Modal and temporal logic

First Order Logic: Syntax and Semantics

RELATIONS BETWEEN PARACONSISTENT LOGIC AND MANY-VALUED LOGIC

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Classical First-Order Logic

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

185.A09 Advanced Mathematical Logic

Section 1.2: Propositional Logic

A brief introduction to Logic. (slides from

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

Systems of modal logic

Some consequences of compactness in Lukasiewicz Predicate Logic

Normal Forms of Propositional Logic

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Transcription:

Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018 1 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 2 / 31

Language of propositional logic The language of propositional logic consists of: 1 Symbols: Infinite set of variables V AR = {p, q, r,...} Four (4) special symbols:,, (, ). 2 Rules of composition: We present a recursive definition of properly constructed propositional formulæ (or propositional formulæ for short) Variables, i.e., elements of V AR = {p, q, r,...} are propositional formulæ. If φ is a propositional formula then φ is a propositional formula. If φ and ψ are propositional formulæ then (φ ψ) is a propositional formula. The set of all properly constructed propositional formulæ we will denote by F ORM. Marcin Szczuka (MIMUW) Applied Logic 2018 3 / 31

Language of propositional logic We call symbols and logical connectives (or logical operators). The parentheses (,) are introduced to determine the precedence of operations and can be dropped without lack of generality. In order to simplify notation and support intuitive understanding we introduce additional symbols such as constants, and operators,,. They are defined as follows: φ ψ = def ( φ ψ) φ ψ = def φ ψ φ ψ = def ( φ ψ) ( ψ φ) = def p p for any p V AR = def p p for any p V AR The meaning of logical operators and constants (which may be treated as operators with 0 arguments) will be explained further in this lecture. Marcin Szczuka (MIMUW) Applied Logic 2018 4 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 5 / 31

Meaning (semantics) of symbols Let B = {0, 1}. We associate 0 with logical value FALSE and 1 with TRUE. Then, the logical operators are associated with corresponding functions on B. Connective corresponds to function : B B, such that (x) = 1 x. Two-argument connectives correspond to functions of the form : B B B where is any operator in {,,, }. The following truth table defines common operators: x y x y x y x y x y 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1 Intuitively,,, correspond to disjunction (alternative,... or...), conjunction (... and... ), and implication (if... then...) in natural language, respectively. Marcin Szczuka (MIMUW) Applied Logic 2018 6 / 31

Valuation Valuation is (any) a function v : V AR B. For any valuation v we may define semantics, i.e., a function [.] v : F ORM B. The definition is recursive w.r.t. the structure of formula. (Const) [ ] v = 1; [ ] = 0 (Var) for any variable p V AR ( ) for any formula φ F ORM [p] v = v(p) [ φ] v = 1 [φ] v ( ) for any formulæ φ, ψ F ORM [φ ψ ] v = [φ] v [ψ ] v where is an abitrary logical operator (e.g.,,,,...). Marcin Szczuka (MIMUW) Applied Logic 2018 7 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 8 / 31

Logical consequence, model Model in propositional logic Valuation v is a model of a formula φ iff [φ] v = 1. Conversely, we say that φ is true for v. In 1936, Tarski introduced the notion of logical consequence (also called semantic consequence relation ). This relation is defined as follows: Logical (semantic) consequence Formula φ is a logical consequence of the set of formulæ Φ if φ is true for every model of (all members of the set) Φ. We denote that by: Φ = φ Marcin Szczuka (MIMUW) Applied Logic 2018 9 / 31

Tautologies, syntactic vs. sematic Every formula φ for which relation = φ holds we call a tautology. Tautologies are formulaæ that are true for any model (any valuation). The main objective of propositional calculus is to give syntactic description corresponding to the semantic consequence relation = by setting up an appropriate formal system (syntactic inference system). This can be done in a number of ways, but we will concentrate on one that is most convenient for later generalisation to modal situations. We will describe this system, Hilbert style, in next slides. Marcin Szczuka (MIMUW) Applied Logic 2018 10 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 11 / 31

Propositional inference system Every inference (deduction) system can be (due to Hilbert) set up by providing axioms and rules of inference. Propositional inference system Axioms. Our axioms are all tautologies plus all formulæ of the form (k) φ (θ φ) (l) (θ (ψ φ)) ((θ ψ) (θ φ)) together with enough axioms to control the other connectives. Single rule of inference called modus ponens: θ, θ φ φ (M odus ponens) The above system (axioms and rule of inference) will be used to generate a proof theoretic syntactic consequence (inference) relation. Marcin Szczuka (MIMUW) Applied Logic 2018 12 / 31

Syntactic consequence Let Φ be a set of formulæ. (a) A witnessing deduction (proof) from Φ is a sequence φ 0, φ 1,..., φ n of formulæ such that for each formula φ i of the sequence, at least one of the following holds: 1 φi Φ 2 φi is an axiom. 3 There exist formulæ φj, φ k occurring earlier in the sequence (i.e., with j, k < i) such that φ k = (φ j φ i ) (b) For each formula φ, relation Φ φ holds if and only if there exists a witnessing deduction (a formal proof) from Φ ending with φ. Marcin Szczuka (MIMUW) Applied Logic 2018 13 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 14 / 31

Deduction property Relation Φ φ is the syntactic simulation of logical (semantic) consequence. The introduced system, by definition, has the Deduction Property : Deduction Property For each set of formulæ Φ and a pair of formulæ θ, φ the implication holds. Φ, θ φ Φ (θ φ) (1) Unfortunately, this important property fails to hold for most of the modal logical systems. Marcin Szczuka (MIMUW) Applied Logic 2018 15 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 16 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 17 / 31

Soundness and adequacy Completeness of the logical system is the property that unifies syntactic and semantic consequences ( = and ). Normally, a proof of completeness for a given logical (formal) system consists of two steps: 1 Proof of soundness, i.e., proof that syntax is OK in the sense that it cannot lead to false conclusions given true axioms. Formally we write it as: Φ φ Φ = φ In our (propositional) case the soundness proof is done by a routine induction on the length of the witnessing (formal) deduction that justifies Φ φ. 2 Proof of adequacy, i.e., proof that all that is true under a set of assumptions can be formally deduced. This corresponds to showing that: Φ = φ Φ φ Proof of adequacy is frequently treated as equivalent to the proof of completeness since soundness is typically quite easy to prove. Marcin Szczuka (MIMUW) Applied Logic 2018 18 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 19 / 31

Consistency Proving completeness means proving that Φ = φ Φ φ holds both ways. As stated before, proof of soundness is not interesting. We concentrate on proving adequacy and hence completeness. This can (again) be done in a number of ways, but we will use the notion of consistency in order to come out with proof that will be later easy to adjust to modal case. Consistent set of fomulæ The set of formulæ Φ is consistent if the relation does not hold. Φ In plain language it means that one cannot falsify system using only consistent set of formulaæ, axioms and inference rule(s). Marcin Szczuka (MIMUW) Applied Logic 2018 20 / 31

Consistent sets of formulæ Let CON be the set of all consistent sets Φ. By design of formal system, CON has the following properties: 1 For each set of formulæ Φ we have Φ CON iff Ψ CON for each finite subset Ψ Φ. This property is called finite character. 2 For each variable p V AR we have {p, p} / CON and, of course, { } / CON. This property is called basic (or ground) consistency. 3 For each set of formulæ Φ CON an for each φ, θ we have: (φ θ) Φ Φ {φ, θ} CON (φ θ) Φ Φ { φ, θ} CON (φ θ) Φ Φ {φ, θ} CON This property is called conjunctive preservation. Marcin Szczuka (MIMUW) Applied Logic 2018 21 / 31

Consistent sets of formulæ cont. 4 For each set of formulæ Φ CON an for each φ, θ we have: (φ θ) Φ Φ {φ} CON or Φ {θ} CON (φ θ) Φ Φ { φ} CON or Φ { θ} CON (φ θ) Φ Φ { φ} CON or Φ {θ} CON This property is called disjunctive preservation. 5 For each set of formulæ Φ CON an for each φ we have: φ Φ Φ {φ} CON This property is called negation preserving. Marcin Szczuka (MIMUW) Applied Logic 2018 22 / 31

Maximally consistent sets of formulæ By MAXCON we denote the family of maximally consistent sets of formulæ, i.e., a family of those Ψ CON, which for all Φ CON satisfy the rule IF Ψ Φ THEN Ψ = Φ The next lemma, showing the validity of MAXCON definition, is the cornerstone of the completeness proof. Lemma - basic existence result For each Φ CON there exists Σ MAXCON such that Φ Σ. In other words, the notion of maximally consistent set of formulæ is non-trivial and each consistent set of formulæ can be extended to maximal one. Marcin Szczuka (MIMUW) Applied Logic 2018 23 / 31

Proof of basic existence result Let {ψ i : i < ω} be the enumeration of all formulæ. We define a sequence of sets of formulæ { r : r < ω} as follows: 0 = Φ { r {ψ r+1 = r } if this set is in CON, otherwise. r Note, that CON for all r < ω, and hence Σ = { r : r < ω} CON since Σ defined in this way is an upper limit of this family. By construction we also get that Σ MAXCON since no element of CON can contain the upper limit of the family in a non-trivial way. Marcin Szczuka (MIMUW) Applied Logic 2018 24 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 25 / 31

Existence of the model Theorem existence of the model Each consistent set of formulæ Φ CON has a model. Proof: Let Σ be the maximally consistent set of formulæ such that Φ Σ. We define valuation v Σ : V AR {0, 1} as follows: { 1 if p Σ, v Σ (p) = 0 if p / Σ. By simple induction we can show that valuation v Σ is a model for (all formulæ in) Σ, and hence Φ. In the induction step we make use of the fact that implications in all preservation properties Marcin Szczuka (MIMUW) Applied Logic 2018 26 / 31

Completeness Completeness theorem For each set of formulæ Φ and each formula φ Φ φ Φ = φ Proof: Implication ( ) is soundness, so it suffices to prove ( ). Suppose Φ = φ, then Φ { φ} has no model. Hence existence theorem gives thus hence from Deduction Property Φ { φ} / CON Φ, { φ} Φ ( φ ) which (with use of appropriate axiom) gives Φ ( φ). But, we know that Φ always holds which gives Φ φ. (Q.E.D.) Marcin Szczuka (MIMUW) Applied Logic 2018 27 / 31

Lecture plan 1 Language of propositional logic 2 Binary (two-value) semantics 3 Logical consequence, model 4 Syntax 5 Deduction property 6 Completeness Soundness and adequacy Consistency Completeness proof 7 Compactness Marcin Szczuka (MIMUW) Applied Logic 2018 28 / 31

Satisfiability Let us recall, that a set of formulæ Φ is consistent if the relation Φ does not hold. This, according to completeness theorem, means that it has a model, i.e., there exists valuation such that every formula in Φ is true. Due to this assertion we may refer to consistent sets as satisfiable sets. Let us consider a decision problem problem known as satisfiability problem or SAT. We have to decide if a given set of formulæ Φ is satisfiable, i.e., if there exists a satisfying valuation for all members of Φ. In light of completeness theorem we may attempt to prove/disprove satisfiability in one of two ways: 1 Experimentally: check by trial-and-error if we can find, among all possible valuations, a model (satisfying valuation) for Φ. 2 Theoretically: check if we can produce a witnessing deduction that yields from Φ (Φ ). Marcin Szczuka (MIMUW) Applied Logic 2018 29 / 31

Compactness Here we will showcase yet another, third way for checking/proving the satisfiability of a set of formulæ. We will show that the logical system that we have crafted for propositional calculus possesses the Compactness Property. Theorem compactness of propositional system In propositional calculus, if every finite subset of a set of formulæ Φ has a model, then Φ also has a model. Marcin Szczuka (MIMUW) Applied Logic 2018 30 / 31

Compactness proof Proof: Assumption: Let Φ be an arbitrary set of formulæ such that it satisfies preposition of the compactness theorem, i.e., each of its finite subsets has a model. In order to prove theorem it suffices to show that Φ is consistent. Let us apagogically assume that Φ is inconsistent. If Φ is inconsistent, then there exists a witnessing deduction W = φ 0, φ 1,...φ n, for the relation Φ. But, in such case there exists a finite set of formulæ Ψ Φ inside which W is a proper witnessing deduction as well. Hence, by definition, Ψ, which means that Ψ has no model. Thus, we have directly contradicted the Assumption which proves the compactness.(q.e.d.) Marcin Szczuka (MIMUW) Applied Logic 2018 31 / 31