INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

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

INTRODUCTION TO LOGIC 3 Formalisation in Propositional Logic

Introduction to Metalogic

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

Lecture 7. Logic. Section1: Statement Logic.

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

PHIL12A Section answers, 16 February 2011

THE LOGIC OF COMPOUND STATEMENTS

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

Chapter 4: Classical Propositional Semantics

INTRODUCTION TO LOGIC 1 Sets, Relations, and Arguments. Why logic? Arguments

Propositional Language - Semantics

22c:145 Artificial Intelligence

Propositional Logic and Semantics

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

Topic 1: Propositional logic

Logic. Readings: Coppock and Champollion textbook draft, Ch

5. And. 5.1 The conjunction

Advanced Topics in LP and FP

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

Natural Deduction for Propositional Logic

a. ~p : if p is T, then ~p is F, and vice versa

CSC Discrete Math I, Spring Propositional Logic

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Ling 130 Notes: Syntax and Semantics of Propositional Logic

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

02 Propositional Logic

Introduction to Metalogic 1

Logic: Propositional Logic (Part I)

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

CS 2800: Logic and Computation Fall 2010 (Lecture 13)

5. And. 5.1 The conjunction

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

Truth-Functional Logic

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

THE LOGIC OF COMPOUND STATEMENTS

A Little Deductive Logic

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

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

LIN1032 Formal Foundations for Linguistics

The semantics of propositional logic

15414/614 Optional Lecture 1: Propositional Logic

Section 1.1: Logical Form and Logical Equivalence

Logic for Computer Science - Week 4 Natural Deduction

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

A Little Deductive Logic

Artificial Intelligence. Propositional logic

Proofs. Joe Patten August 10, 2018

Tecniche di Verifica. Introduction to Propositional Logic

A Statement; Logical Operations

INTRODUCTION TO LOGIC

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

Lecture 4: Proposition, Connectives and Truth Tables

Logic for Computer Science - Week 2 The Syntax of Propositional Logic

First Order Logic (1A) Young W. Lim 11/18/13

Learning Goals of CS245 Logic and Computation

An Introduction to Classical Propositional Logic: Syntax, Semantics, Sequents

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

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Propositional Logic Not Enough

CSE 20: Discrete Mathematics

INTRODUCTION TO LOGIC

3 The Semantics of the Propositional Calculus

CSCE 222 Discrete Structures for Computing. Propositional Logic. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

Propositional Logic Review

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

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

6. Conditional derivations

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

PL: Truth Trees. Handout Truth Trees: The Setup

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

Propositional Logic. Spring Propositional Logic Spring / 32

Context Free Grammars

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

ECE473 Lecture 15: Propositional Logic

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

Exclusive Disjunction

INTRODUCTION TO LOGIC 4 The Syntax of Predicate Logic

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Chapter 1. Logic and Proof

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Mathematics for linguists

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

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

a. Introduction to metatheory

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

Unary negation: T F F T

The statement calculus and logic

INF3170 Logikk Spring Homework #8 For Friday, March 18

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

6. Conditional derivations

It rains now. (true) The followings are not propositions.

185.A09 Advanced Mathematical Logic

EXERCISE 10 SOLUTIONS

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

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

C. Modal Propositional Logic (MPL)

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

Transcription:

Introduction INTRODUCTION TO LOGIC 2 Syntax and Semantics of Propositional Logic Volker Halbach In what follows I look at some formal languages that are much simpler than English and define validity of arguments, truth under an interpretation, consistency etc. for these formal languages. In logic one abstracts from all stylistic variants etc of natural language and retains just the basic skeleton of the language in a regimented form. Logic is the beginning of wisdom. Thomas Aquinas 1.6 Syntax vs. Semantics 1.6 Syntax vs. Semantics When presenting a formal language, I proceed in the following order: 1 I specify the syntax or grammar of the language; in particular I define what the sentences of the language are. 2 I specify the semantics of the language; in particular, I say what it means for a sentence to be true under an interpretation (or in a structure ). Once the notion of an interpretation (or structure) is clear, I can define validity of arguments etc as for English. Syntax is all about expressions: words and sentences. Examples of syntactic claims Bertrand Russell is a proper noun. likes logic is a verb phrase. Bertrand Russell likes logic is a sentence. Combining a proper noun and a verb phrase in this way yields a sentence.

1.6 Syntax vs. Semantics 2.1 Quotation Note our use of quotes to talk about expressions. Semantics is all about meanings of expressions. Examples of semantic claims Bertrand Russell refers to a British philosopher. Bertrand Russell refers to Bertrand Russell. likes logic expresses a property Russell has. Bertrand Russell likes logic is true. Bertrand Russell refers to Bertrand Russell. Mention The first occurrence of Bertrand Russell is an example of mention. This occurrence (with quotes) refers to an expression. Use The second occurrence of Bertrand Russell is an example of use. This occurrence (without quotes) refers to a man. Syntax: English vs. L 1. English has many different sorts of expressions. Some expressions of English (1) Sentences: Bertrand Russell likes logic, Philosophers like conceptual analysis, etc.. (2) Connectives: it is not the case that, and, etc.. (3) Noun phrases: Bertrand Russell, Philosophers, etc.. (4) Verb phrases: likes logic, like conceptual analysis, etc.. (5) Also: nouns, verbs, pronouns, etc., etc., etc.. L 1 has just two sorts of basic expressions. Some basic expressions of L 1 (1) Sentence letters: e.g. P, Q. (2) Connectives: e.g.,. There are also brackets: ( and ). Combining sentences and connectives makes new sentences. Some complex sentences It is not the case that and Bertrand Russell likes logic make: It is not the case that Bertrand Russell likes logic. and P make: P. Bertrand Russell likes logic and and and Philosophers like conceptual analysis make: Bertrand Russell likes logic and philosophers like conceptual analysis. P, and Q make: (P Q). Logic convention: no quotes around L 1 -expressions. P, and Q make: (P Q).

Connectives The syntax of L 1 Here s the official definition of L 1 -sentence. Here s the full list of L 1 -connectives. name in English symbol conjunction and disjunction or negation it is not the case that arrow if... then double arrow if and only if (i) All sentence letters are sentences of L 1 : P, Q, R, P 1, Q 1, R 1, P 2, Q 2, R 2, P 3,... (ii) If ϕ and ψ are sentences of L 1, then so are: ϕ (ϕ ψ) (ϕ ψ) (ϕ ψ) (ϕ ψ) (iii) Nothing else is a sentence of L 1. Greek letters: ϕ ( PHI ) and ψ ( PSI ): not part of L 1. 35 How to build a sentence of L 1 Example The following is a sentence of L 1 : I mentioned that ϕ and ψ are not part of L 1. P is a L 1 -sentence. ϕ describes many L 1 -sentences (but is not one itself). e.g. P, (Q R), (P (Q R)),... (((P Q) (P R 45 )) ((P 3 R) R)) of L 1 -sentences (repeated from previous page) (i) All sentence letters are sentences of L 1. (ii) If ϕ and ψ are sentences of L 1, then ϕ, (ϕ ψ), (ϕ ψ), (ϕ ψ) and (ϕ ψ) are sentences of L 1. (iii) Nothing else is a sentence of L 1. ϕ and ψ are part of the metalanguage, not the object one. Object language The object language is the one we are theorising about. The object language is L 1. Metalanguage The metalanguage is the one we are theorising in. The metalanguage is (augmented) English. ϕ and ψ are used as variables in the metalanguage: in order to generalise about sentences of the object language.

Bracketing conventions There are conventions for dropping brackets in L 1. Some are similar to rules used for + and in arithmetic. Example in arithmetic 4 + 5 3 does not abbreviate (4 + 5) 3. binds more strongly than +. 4 + 5 3 abbreviates 4 + (5 3). Conventions in L 1 and bind more strongly than and. (P Q R) abbreviates (P (Q R)). L 1 -structures One may drop outer brackets. P (Q P 4 ) abbreviates (P (Q P 4 )). 2.3 Rules for Dropping Brackets One may drop brackets on strings of s or s that are bracketed to the left. (P Q R) abbreviates ((P Q) R). 25 We interpret sentence letters by assigning them truth-values: either T for True or F for False. An L 1 -structure is an assignment of exactly one truth-value (T or F) to every sentence letter of L 1. Examples We can think of an L 1 -structure as an infinite list that provides a value T or F for every sentence letter. P Q R P 1 Q 1 R 1 P 2 Q 2 R 2 A F F T B F F F F F F F F F We use A, B, etc. to stand for L 1 -structures. Semantics Recall the characterisation of validity from week 1. Characterisation An argument is logically valid if and only if there is no interpretation of subject-specific expressions under which: (i) the premisses are all true, and (ii) the conclusion is false. We ll adapt this characterisation to L 1. Logical expressions:,,, and. Subject-specific expressions: P, Q, R,... Interpretation: L 1 -structure. Truth-values of complex sentences 1/3 L 1 -structures only directly specify truth-values for P, Q, R,... The logical connectives have fixed meanings. These determine the truth-values of complex sentences. Notation: ϕ A is the truth-value of ϕ under A. For all L 1 -structures A and sentences ϕ we have either ϕ A = T or ϕ A = F. Truth-conditions for The meaning of is summarised in its truth table. In words: ϕ A = T if and only if ϕ A = F.

Worked example 1 ϕ A is the truth-value of ϕ under A. Compute the following truth-values. Let the structure A be partially specified as follows. P Q R P 1 Q 1 R 1 P 2 Q 2 R 2 F F T Compute: P A = T Q A = F R 1 A = F P A = F Q A = T R 1 A = T P A = T Q A = F R 1 A = F Truth-values of complex sentences 2/3 Truth-conditions for and The meanings of and are given by the truth tables: ϕ ψ (ϕ ψ) T T T F F F F F ϕ ψ (ϕ ψ) T T T T T F F F (ϕ ψ) A = T if and only if ϕ A = T and ψ A = T. (ϕ ψ) A = T if and only if ϕ A = T or ψ A = T (or both). 15 Truth-values of complex sentences 3/3 Truth-conditions for and The meanings of and are given by the truth tables: ϕ ψ (ϕ ψ) T T T F T F ϕ ψ (ϕ ψ) T T T F F F (ϕ ψ) A = T if and only if ϕ A = F or ψ A = T. (ϕ ψ) A = T if and only if ϕ A = ψ A. Worked example 2 Let P B = T and Q B = F. Compute (P Q) (P Q) B What is the truth value of (P Q) (P Q) under B? 1 (P Q) B = F and (P Q) B = F 2 (P Q) B = T 3 (P Q) (P Q) B = F ϕ ψ (ϕ ψ) (ϕ ψ) T T T T F F F T F F

For actual calculations it s usually better to use tables. Suppose P B = T and Q B = F. Compute (P Q) (P Q) B P Q (P Q) (P Q) T F F F Using the same technique we can fill in the full truth table for (P Q) (P Q) P Q (P Q) (P Q) T T T T T T T T T F F F F T F F F F F F ϕ ψ (ϕ ψ) (ϕ ψ) T T T T F F F T F F The main column (in boldface) gives the truth-value of the whole sentence. ϕ ψ (ϕ ψ) (ϕ ψ) T T T T F F F T F F Validity Let Γ be a set of sentences of L 1 and ϕ a sentence of L 1. The argument with all sentences in Γ as premisses and ϕ as conclusion is valid if and only if there is no L 1 -structure under which: (i) all sentences in Γ are true; and (ii) ϕ is false. Notation: when this argument is valid we write Γ ϕ. {P Q, Q} P means that the argument whose premises are P Q and Q, and whose conclusion is P is valid. Also written: P Q, Q P Worked example 3 We can use truth-tables to show that L 1 -arguments are valid. Example Show that {P Q, Q} P. P Q P Q Q P T T T T T F F T T F F F Rows correspond to interpretations. One needs to check that there is no row in which all the premisses are assigned T and the conclusion is assigned F. 5

Other logical notions A sentence ϕ of L 1 is logically true (a tautology) iff: ϕ is true under all L 1 -structures. e.g. P P, and P P are tautologies. Truth tables of tautologies Every row in the main column is a T. P P P P P T T T T T T F F A sentence ϕ of L 1 is a contradiction iff: ϕ is not true under any L 1 -structure. e.g. P P, and (P P) are contradictions. Truth tables of contradictions Every row in the main column is an F. P P P (P P) T F T T T F F F F F Sentences ϕ and ψ are logically equivalent iff: ϕ and ψ are true in exactly the same L 1 -structures. P and P are logically equivalent. P Q and ( P Q) are logically equivalent. Truth tables of logical equivalents The truth-values in the main columns agree. P Q P Q ( P Q) T T T T T F F T F F T F F F F F F T Worked example 4 Example Show that the sentence (P ( Q R)) P is a tautology. Method 1: Full truth table Write out the truth table for (P ( Q R)) P. Check there s a T in every row of the main column. P Q R (P ( Q R)) P T T T F T T T T F T T T T T T T T F F T T F F F F F T T T F F F F F

Worked example 4 (cont.) Show that the sentence (P ( Q R)) P is a tautology. Method 2: Backwards truth table. Put an F in the main column. Work backwards to show this leads to a contradiction. P Q R (P ( Q R)) P T 3? F 1 F F 2 ϕ ψ (ϕ ψ) (ϕ ψ) (ϕ ψ) T T T T T F F T T F F F