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

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

Language of Propositional Logic

Natural Deduction for Propositional Logic

Logic: Propositional Logic (Part I)

Inference in Propositional Logic

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

Modal Logic. UIT2206: The Importance of Being Formal. Martin Henz. March 19, 2014

15414/614 Optional Lecture 1: Propositional Logic

UNIT-I: Propositional Logic

2.2: Logical Equivalence: The Laws of Logic

Learning Goals of CS245 Logic and Computation

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

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

Propositional Logic Language

CISC-102 Winter 2016 Lecture 17

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Propositional Logic Part 1

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

THE LOGIC OF COMPOUND STATEMENTS

Tecniche di Verifica. Introduction to Propositional Logic

22c:145 Artificial Intelligence

Topic 1: Propositional logic

Propositional Logic: Review

Chapter 1 Elementary Logic

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

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

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

A Little Deductive Logic

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

Propositional Logic: Models and Proofs

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

LING 106. Knowledge of Meaning Lecture 3-1 Yimei Xiang Feb 6, Propositional logic

Packet #1: Logic & Proofs. Applied Discrete Mathematics

03 Propositional Logic II

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

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.

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

Logic for Computer Science - Week 4 Natural Deduction

Chapter 4: Classical Propositional Semantics

Warm-Up Problem. Write a Resolution Proof for. Res 1/32

02 Propositional Logic

Proof strategies, or, a manual of logical style

Advanced Topics in LP and FP

LING 501, Fall 2004: Laws of logic and the definitions of the connectives

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

Supplementary Logic Notes CSE 321 Winter 2009

A Little Deductive Logic

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

Introduction to Metalogic

Propositional Logic and Semantics

Logic and Proofs. (A brief summary)

cse541 LOGIC FOR COMPUTER SCIENCE

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

Chapter 2: Introduction to Propositional Logic

Artificial Intelligence. Propositional logic

Equational Logic: Part 2. Roland Backhouse March 6, 2001

Propositional Logic. Yimei Xiang 11 February format strictly follow the laws and never skip any step.

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

A statement is a sentence that is definitely either true or false but not both.

1.1 Language and Logic

Logic, Sets, and Proofs

Propositional Logics and their Algebraic Equivalents

Logic and Inferences

CSC165 Mathematical Expression and Reasoning for Computer Science

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Logic and Proofs 1. 1 Overview. 2 Sentential Connectives. John Nachbar Washington University December 26, 2014

CISC-102 Fall 2018 Week 11

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)


Artificial Intelligence Knowledge Representation I

MAI0203 Lecture 7: Inference and Predicate Calculus

CSC Discrete Math I, Spring Propositional Logic

Propositional Language - Semantics

Manual of Logical Style (fresh version 2018)

Logic: Propositional Logic Truth Tables

1 IPL and Heyting Prelattices

CHAPTER 11. Introduction to Intuitionistic Logic

INF3170 Logikk Spring Homework #8 For Friday, March 18

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January )

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

Propositional logic. Programming and Modal Logic

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

Chapter 11: Automated Proof Systems

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

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

The Logic of Compound Statements cont.

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

Manual of Logical Style

Propositional logic. Programming and Modal Logic

Lecture 7. Logic. Section1: Statement Logic.

Introduction to Sets and Logic (MATH 1190)

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

COMP 2600: Formal Methods for Software Engineeing

1.1 Language and Logic

Compound Propositions

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

Transcription:

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

Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.) p. 2/34

Logical propositions The basic building blocks of any logic are logical formulæ (also called propositions or sentences ). Examples: Propositional logic: p (p q) q, p p, (p q) (q p). Predicate logic: x. y : f(x,g(y)) = c. Modal logic: (p q) ( p q). p. 3/34

The language of propositional logic Definition. The language of propositional logic has an alphabet consisting of propositional atoms: p,q,r,... connectives:,,,,, auxiliary symbols: (, ) p. 4/34

The language of propositional logic The connectives carry the traditional names: and conjunction or disjunction if... then... implication not negation true false p. 5/34

Syntax of formulæ Definition. The formulæ of propositional logic, for a given set {p,q,r,...} of propositional atoms, is given as follows: every propositional atom a formula, and so are and ; if A and B are formulæ, then so are (A B) and (A B) and (A B); if A is a formula, then so is ( A); (We shall often omit brackets if the meaning is clear.) p. 6/34

Meta-variables and object-variables The greek letters A,B,... are meta-variables: they are not formulæ they part of our mathematician s English. By contrast, the propositional atoms p,q,... are object-variables: they are formulæ. p. 7/34

Meta-language and object-language Consider the following sentence: The Java program P runs faster than the Java program Q, because P has a better handling of the variable counter. Java is the object-language, i.e. the language about which we speak. counter is an object-variable, because it belongs to Java. IT-English is the meta-language, i.e. the language in which we speak. P and Q are meta-variables. p. 8/34

Meta-language and object-language Back to logics: Mathematician s (or logician s) English (or German or... ) is our meta-language. A,B,... are meta-variables. Formulæ and similar things form the object-language. p, q,... are object-variables. p. 9/34

Semantics So far, we have discussed the syntax, i.e. the rules defining the language (of formulæ). But what is the meaning of a formula? Semantics is the study of meanings. p. 10/34

Semantics For example, in computability theory, the meaning of a program (or Turing machine or abacus machine...) is a function from the natural numbers to the natural numbers. English sentences also have a meaning (but it is extremely hard to capture mathematically). p. 11/34

Semantics of logical formulæ In logics, meaning is often described by a satisfaction relation M = A that describes when a situation M satisfies a formula A. It varies between logics what formulæ and situations are. p. 12/34

Situations Definition. A situation M in propositional logic (also called valuation ) assigns to each propositional atom p a value [p] M {0, 1}. p. 13/34

The satisfaction relation Definition. The satisfaction relation = is defined as follows: M = A B iff M = A and M = B M = A B iff M = A or M = B M = A B iff whenever M = A then M = B M = A iff M = A M = always M = never M = p iff [p] M = 1 p. 14/34

The satisfaction relation Definition. A situation M is said to satisfy a formula A if M = A. Definition. A situation M is said to satisfy a set Γ of formulæ if M satisfies every formula in Γ. In this case, we write M = Γ. p. 15/34

Models Definition. A situation M that satisfies a formula A is called a model of A. A situation M that satisfies a set of formulæ Γ is called a model of Γ. p. 16/34

Examples Let M be a situation such that M = p M = q M = r. Which of the following entailments hold? 1. M = p q 2. M = q r 3. M = p q 4. M = q q p. 17/34

Truth-table semantics The satisfaction relation we have just seen can also be presented by using truth-tables: A B A B A B A B A B A B 0 0 0 0 0 0 0 0 1 A A 0 1 0 0 1 1 0 1 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 Exercise: formalize this. p. 18/34

Validity Definition. A propositional formula A is called valid (or a tautology) if it holds in every situation, i.e. M = A for all situations M. Example. Which of the formulæ below are valid? 1. (p q) ((q r) (p r)) 2. p q r p. 19/34

Exercise Show that the formulæ below are tautologies (where {, }) and A B is defined as (A B) (B A): ((A B) C) (A (B C)) (associativity) (A B) (B A) (commutativity) (A ) A (A ) A (neutrality) (A (B C)) ((A B) C) (linear distributivity) ( A A) (contradiction) (A A) (excluded middle) A A A (idempotency) A A (ex falso quodlibet). Remark: this is an axiomatization of Boolean lattices. p. 20/34

Exercise Show that the formulæ below are tautologies: (A B) ( A B) (DeMorgan) (A B) ( A B) (DeMorgan) (DeMorgan) (DeMorgan) (A B) ( A B) ( A ) A (reductio ad absurdum) ( B A) (A B) (contrapositive) ((A B) A) A (Pierce s law). p. 21/34

Satisfiability Definition. A set of formulæ Γ is called satisfiable if it has a model, i.e. M = Γ for some situation M. Example: Which of the sets below are satisfiable? {p, q} {p, p} p. 22/34

Semantic entailment Definition. Let Γ = {A 1,...,A n } be a set of formulæ, and B a formula. We say that Γ semantically entails B and write Γ = B if every model of {A 1,...,A n } is also a model of B. Remark: sometimes, entailment is called consequence. Warning: Γ = B differs from M = B; these conflicting uses of the symbol = are traditional. p. 23/34

Example Which of the following entailments hold? {p,q,r} = q {} = p p {p q} = p {p p} = q p. 24/34

Exercise: natural deduction Prove the following facts about semantic entailment. (These are the rules of natural deduction, which we shall study soon. The comma stands for union of sets of formulæ.) Γ = A Γ = B i Γ = A B Γ,A = B i Γ = A B Γ = A B e Γ = A Γ = A B Γ = B Γ = A B e Γ = B Γ = A e Γ = e Γ = A Γ, A = RAA Γ = A p. 25/34

Example: modus ponens We prove Γ = A B Γ = B Γ = A e This is the famous modus ponens already known to the ancient Greeks. Proof: Suppose that M = Γ. Because of the two assumptions, we have M = A B and M = A. By definition, the statement M = A B means that M = B whenever M = A. So M = B. p. 26/34

Multiple conclusions Definition. Let Γ = {A 1,...,A n } and = {B 1,...,B m } be sets of formulæ. We say that Γ semantically entails and write Γ = if every model of A 1,...,A n satisfies at least one B i in. Note that this is the same as saying that A 1... A n = B 1... B m. p. 27/34

Examples Which of the following entailments hold? {p q} = {p,q} {} = {p,q p} {p, p} = {} {} = {p, p} p. 28/34

Example: right weakening Claim: whenever Γ = and, it holds that Γ =. Short notation: Is the claim true? Γ = if. Γ = p. 29/34

Exercise: sequent calculus Prove the following. (These are rules of the sequent calculus, which we shall study later in this course.) A = A Ax Γ 2 = 1, A, 3 Γ 1, A,Γ 3 = 2 Cut Γ 1,Γ 2,Γ 3 = 1, 2, 3 Γ, A, B = Γ, A B = L Γ = A, Γ = B, R Γ,Γ, = A B,, Γ, A = Γ, B = L Γ,Γ, A B =, Γ = A, Γ, B = L Γ, Γ, A B =, Γ = A, B, Γ = A B, Γ, A =, B Γ = A B, R R p. 30/34

Example: the cut rule The famous cut rule, which we shall study in depth later, states that whenever then Γ 2 = 1,A, 3 and Γ 1,A, Γ 3 = 2, Short notation: Γ 1, Γ 2, Γ 3 = 1, 2, 3. Γ 2 = 1,A, 3 Γ 1,A, Γ 3 = 2. Γ 1, Γ 2, Γ 3 = 1, 2, 3 p. 31/34

Validity of the cut rule Suppose that Γ 2 = 1,A, 3 and Γ 1,A, Γ 3 = 2. To see that Γ 1, Γ 2, Γ 3 = 1, 2, 3, assume that M = Γ 1, Γ 2, Γ 3. Because Γ Γ 2, the situation M satisfies at least one formula in 1,A, 3. Case 1: M = A. In this case, we have M = Γ 1,A, Γ 3, and therefore M = 2. By right weakening M = 1, 2, 3. Case 2: M = 1, 3. In this case, the claim follows directly from right weakening. p. 32/34

Entailment, validity, and satisfiability The semantic entailment relation = is convenient for expressing validity and unsatisfiability. Before we explain this, we introduce two abbreviations: we write = instead of {} =, and instead of Γ = {}. Γ = p. 33/34

Entailment, validity, and satisfiability Observation: we have = A if and only if A is valid, and Γ = if and only if Γ is unsatisfiable. p. 34/34