cse541 LOGIC FOR COMPUTER SCIENCE

Similar documents
Chapter 2: Introduction to Propositional Logic

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Chapter 4: Classical Propositional Semantics

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

Learning Goals of CS245 Logic and Computation

Gödel s Incompleteness Theorems by Sally Cockburn (2016)

185.A09 Advanced Mathematical Logic

Lecture 7. Logic. Section1: Statement Logic.

Axiomatic set theory. Chapter Why axiomatic set theory?

Truth-Functional Logic

02 Propositional Logic

CHAPTER 11. Introduction to Intuitionistic Logic

Advanced Topics in LP and FP

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

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

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

DISCRETE STRUCTURES WEEK5 LECTURE1

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

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

Tecniche di Verifica. Introduction to Propositional Logic

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

Logic for Computer Science - Week 4 Natural Deduction

Propositional natural deduction

Propositional Resolution Introduction

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

CM10196 Topic 2: Sets, Predicates, Boolean algebras

Comp487/587 - Boolean Formulas

Logic for Computer Science - Week 5 Natural Deduction

Natural Deduction for Propositional Logic

Propositional Logics and their Algebraic Equivalents

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

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

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

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

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

Logic: Propositional Logic (Part I)

What is logic, the topic of this course? There are at least two answers to that question.

Part Two: The Basic Components of the SOFL Specification Language

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

Lecture 4: Proposition, Connectives and Truth Tables

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence

Introduction to Metalogic

COMP 2600: Formal Methods for Software Engineeing

Propositional Logic and Semantics

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

THE LOGIC OF COMPOUND STATEMENTS

Ling 130 Notes: Syntax and Semantics of Propositional Logic

LOGIC. Mathematics. Computer Science. Stanley N. Burris

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

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

CSC Discrete Math I, Spring Propositional Logic

Introduction to Logic

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

Introduction to Logic and Axiomatic Set Theory

Propositional Logic: Syntax

KRIPKE S THEORY OF TRUTH 1. INTRODUCTION

Propositional Logic Language

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

NONSTANDARD MODELS AND KRIPKE S PROOF OF THE GÖDEL THEOREM

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Lecture 2: Syntax. January 24, 2018

Marie Duží

Formal Logic Lecture 11

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

Logic. Propositional Logic: Syntax

1.1 Statements and Compound Statements

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

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

Propositional Logic Review

Compound Propositions

Predicate Calculus - Syntax

Propositional logic ( ): Review from Mat 1348

Discrete Mathematics

Propositional Logic: Logical Agents (Part I)

UNIT-I: Propositional Logic

A Little Deductive Logic

Logic in Computer Science. Frank Wolter

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

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

Introduction to Predicate Logic Part 1. Professor Anita Wasilewska Lecture Notes (1)

1.3 Propositional Equivalences

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1

Logic. Propositional Logic: Syntax. Wffs

Gödel s Incompleteness Theorems

Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein

THE LOGIC OF COMPOUND STATEMENTS

INTRODUCTION TO LOGIC

Mathematics for linguists

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

Nonclassical logics (Nichtklassische Logiken)

A Little Deductive Logic

Class 29 - November 3 Semantics for Predicate Logic

Russell s logicism. Jeff Speaks. September 26, 2007

8. Reductio ad absurdum

Introduction to Sets and Logic (MATH 1190)

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.

First Order Logic (FOL) 1 znj/dm2017

INF3170 Logikk Spring Homework #8 For Friday, March 18

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

Transcription:

cse541 LOGIC FOR COMPUTER SCIENCE Professor Anita Wasilewska Spring 2015

LECTURE 2

Chapter 2 Introduction to Classical Propositional Logic PART 1: Classical Propositional Model Assumptions PART 2: Syntax and Semantics PART 3: Classical Propositional Connectives

Chapter 2 Introduction to Classical Propositional Logic PART 1: Classical Propositional Model Assumptions Very short History Origins: Stoic school of philosophy (3rd century B.C.), with the most eminent representative was Chryssipus. Modern Origins: Mid-19th century English mathematician G. Boole, who is sometimes regarded as the founder of mathematical logic. First Axiomatic System: 1879 by German logician G. Frege.

Classical Propositional Model Assumption 1 The first assumption of the propositional model of classical reasoning, and hence of a formalization of classical propositional logic is the following. We assume that sentences (statements) are always evaluated as true or false. Such sentences are called logical sentences or propositions Hence the name propositional logic (two valued)

Motivation Why two logical values only? We build a model for classical logic to reflect the black and white qualities of mathematics. We expect from mathematical theorems to be always either true or false and the reasonings leading to them should guarantee this without any ambiguity.

Classical Propositional Model Assumption 2 1. We combine logical sentences (basic true- false blocks) to form more complicated sentences, called formulas 2. We combine logical sentences using only only the following words or phrases: not; and; or; if..., then; if and only if 3. We use symbols do denote both logical sentences and the words or phrases, called logical connectives Hence the name symbolic logic

Choice of the Symbols There are different choices of logical symbols; we adopt the following Symbols for logical sentences are a, b, c, p, r, q,..., with indices, if necessary They are called propositional variables Symbols for logical connectives are: for not, for and, for or, for if..., then, and for if and only if. The names for our logical connectives are: negation conjunction, disjunction, implication and equivalence.

Translation Example Exercise: Translate a natural language sentence into corresponding propositional symbolic logic formula. Sentence The fact that it is not true that at the same time 2+2 = 4 and 2+2 = 5 implies that 2+2 = 4 Translation Steps Step 1: identify all logical connectives and we write the sentence introducing parenthesis to express the meaning of the sentence If not (2 + 2 = 4 and 2 + 2 = 5) then 2 + 2 = 4

Translation Example Step 2: identify basic sentences with no logical connectives and assign propositional variables to them: a : 2 + 2 = 4, b : 2 + 2 = 5 Step 3 : we write the (symbolic) formula as ( (a b) a)

PART 2: Syntax Syntax of a symbolic language is the formal description of the symbols we use and the way we construct its set of formulas A formal language, or just a language, is another word for the symbolic language Propositional languages are the syntax of propositional logics Predicate languages form the syntax of more complex logics, called predicate logics or predicate calculi

General Remarks The formal language symbols and well defined set of formulas i.e. an established syntax do not directly carry with them any logical value We assign a logical value to syntactically defined formulas of a given language in a separate step This next step is called a semantics of the given language We will see that a given language can have different semantics and the different semantics will define different logics

Propositional Formulas Propositional formulas are expressions build recursively by means of logical connectives and propositional variables as follows 1. All propositional variables are are formulas They are called atomic formulas 2. For already defined formulas A, B, the expressions (A B), (A B), (A B), (A B), A are also well defined formulas They are called non-atomic formulas

Example By the definition, any propositional variable is a formula. Let s take two variables a and b. By the recursive step we get that are formulas (a b), (a b), (a b), (a b), a, b Recursive step applied again produces for example formulas : (a b), ((a b) b), a, (a b)

Formulas We didn t list all formulas we obtained in the first recursive step. Moreover, the recursive process could continue. The set of all formulas is countably infinite. Remark that we put parenthesis within the formulas in a way to avoid ambiguity The expression: a b a, is ambiguous. We don t know whether it represents (a b) a or a (b a) Observe that neither of a b a, (a b) a or a (b a) is a well formed formula

Introduction to Semantics We explain now how we define propositional connectives in terms of logical values and discuss the motivations for presented definitions The formal description of a process of assigning logical values to all formulas of a given language is called a semantics of the language

Conjunction: Motivation and Definition A conjunction true formulas. (A B) is a true formula if both A and B are If one of the formulas, or both, are false, then the conjunction is a false formula Let s denote statement: formula A is false by A = F and a statement: formula A is true by A = T

Conjunction: Definition The logical value of a conjunction depends on the logical values of its factors in a way which is express in the form of the following table (truth table). Conjunction Table: A B (A B) T T T T F F F T F F F F

Disjunction The word or is used in natural language in two different senses. First: true A or B is true if at least one of the statements A, B is Second: A or B is true if one of the statements A and B is true and the other is false In mathematics and hence in logic, the word or is used in the first sense

Disjunction: Definition We adopt the convention that a disjunction (A B) is true if at least one of the formulas A, B is true Disjunction Table: A B (A B) T T T T F T F T T F F F

Negation: Definition The negation of a true formula is a false formula, and the negation of a false formula is a true formula Negation Table: A A T F F T

Implication: Motivation and Definition The semantics of the statements in the form if A, then B needs a little bit more discussion. In everyday language a statement if A, then B is interpreted to mean that B can be inferred from A. In mathematics its interpretation differs from that in natural language

Implication: Motivation and Definition Consider the following Theorem For every natural number n, if 6 DIVIDES n, then 3 DIVIDES n The theorem is true for any natural number, hence in particular, it is true for numbers 2, 3, 6 Consider number 2 The following proposition is true if 6 DIVIDES 2, then 3 DIVIDES 2 It means an implication (A B) in which A and B are false is interpreted as a true statement

Implication: Motivation and Definition Consider now a number 3 The following proposition is true if 6 DIVIDES 3, then 3 DIVIDES 3, It means that an implication (A B) in which A is false and B is true is interpreted as a true statement Consider now a number 6 The following proposition is true if 6 DIVIDES 6, then 3 DIVIDES 6. It means that an implication (A B) in which A and B are true is interpreted as a true statement

Implication: Motivation and Definition One more case. What happens when in the implication (A B) the formula A is true and the formula B is false Consider a sentence if 6 DIVIDES 12, then 6 DIVIDES 5. Obviously, this is a false statement

Implication: Definition The above examples justify adopting the following definition of a semantics for the implication (A B) Implication Table: A B (A B) T T T T F F F T T F F T

Equivalence Definition An equivalence (A B) is true if both formulas A and B have the same logical value Equivalence Table: A B (A B) T T T T F F F T F F F T

Extensional Connectives Extensional connectives are the connectives that have the following property: the logical value of the formulas form by means of these connectives and certain given formulas depends only on the logical value(s) of the given formulas All classical propositional connectives are extensional,,,,

Propositional Connectives Remark In everyday language there are expressions such as I believe that, it is possible that, certainly, etc... They are represented by some propositional connectives which are not extensional They do not play any role in mathematics and so are not discussed in classical logic, they belong to non-classical logics

Connectives Symbols Other Notations Negation Disjunction Conjunction Implication Equivalence A A B A B A B A B NA DAB CAB IAB EAB A A B A & B A B A B A A B A B A B A B A A + B A B A B A B The first notation is the closest to ours and is drawn mainly from the algebra of sets and lattice theory. The second comes from the Polish logician J. Łukasiewicz and is called the Polish notation The third was used by D. Hilbert. The fourth comes from Peano and Russell The fifth goes back to Schröder and Pierce

All Extensional Connectives There are many other extensional propositional connectives! Here is a table of all unary connectives A 1 A 2 A A 4 A T F T F T F F F T T

All Extensional Connectives Table of all binary connectives: A B (A 1 B) (A B) (A 3 B) (A 4 B) T T F T F F T F F F T F F T F F F T F F F F F F A B (A B) (A 6 B) (A 7 B) (A B) T T F T T T T F F T F F F T F F T F F F T F F T A B (A 9 B) (A 10 B) (A 11 B) (A B) T T F F F T T F T T F T F T T F T T F F F T T F A B (A 13 B) (A B) (A B) (A 16 B) T T T T F T T F T F T T F T F T T T F F T T T T

Functional Dependency Definition Definition Functional dependency of connectives is the ability of defining some connectives in terms of some others classical propositional connectives can be defined in terms of disjunction and negation. Two binary connectives: and suffice, each of them separately, to define all classical connectives, whether unary or binary

Functional Dependency The connective was discovered in 1913 by H.M. Sheffer, who called it alternative negation Now it is often called a Sheffer s connective The formula A B reads: not both A and B. Negation A is defined as A A. Disjunction (A B) is defined as (A A) (B B)

Functional Dependency The connective was termed by J. Łukasiewicz a joint negation The formula A B reads: neither A nor B. It was proved in 1925 by E. Żyliński that no propositional connective other than and suffices to define all the remaining classical connectives Write the proof as an exercise