Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

Similar documents
Discrete Structures of Computer Science Propositional Logic I

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

Compound Propositions

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

DISCRETE STRUCTURES WEEK5 LECTURE1

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Introduction. Applications of discrete mathematics:

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

CSC Discrete Math I, Spring Propositional Logic

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

PROPOSITIONAL CALCULUS

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

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

The statement calculus and logic

1 The Foundations. 1.1 Logic. A proposition is a declarative sentence that is either true or false, but not both.

Logic. Def. A Proposition is a statement that is either true or false.

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

ARTIFICIAL INTELLIGENCE

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Math Assignment 2 Solutions - Spring Jaimos F Skriletz Provide definitions for the following:

Discrete Mathematics

software design & management Gachon University Chulyun Kim

Discrete Mathematics and Applications COT3100

DISCRETE MATHEMATICS BA202

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

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

Propositional Logic 1

EECS 1028 M: Discrete Mathematics for Engineers

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

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

Numbers that are divisible by 2 are even. The above statement could also be written in other logically equivalent ways, such as:

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Chapter 1, Section 1.1 Propositional Logic

Chapter 5: Section 5-1 Mathematical Logic

ECOM Discrete Mathematics

Discrete Structures for Computer Science

Introduction Propositional Logic

Chapter 1: The Logic of Compound Statements. January 7, 2008

Today s Topic: Propositional Logic

The Foundations: Logic and Proofs. Part I

LOGIC & PROPOSITIONAL EQUIVALENCE

MAT2345 Discrete Math

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

Section 1.1: Logical Form and Logical Equivalence

Lecture 02: Propositional Logic

Logic Overview, I. and T T T T F F F T F F F F

Truth-Functional Logic

Unary negation: T F F T

ICS141: Discrete Mathematics for Computer Science I

Propositional Logic. Spring Propositional Logic Spring / 32

Section 3.1 Statements, Negations, and Quantified Statements

Deductive and Inductive Logic

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

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

Propositional Languages

PHIL 422 Advanced Logic Inductive Proof

GEOMETRY. Chapter 2: LOGIC. Name: Teacher: Pd:

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

PS10.3 Logical implications

CSE 20: Discrete Mathematics

Sec 3.3 The Conditional & Circuits

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

Course Staff. Textbook

Propositional Logic. Fall () Propositional Logic Fall / 30

AMTH140 Lecture 8. Symbolic Logic

Propositions. Frequently, we will use the word statement instead of proposition.

Discrete Mathematics and Its Applications

CSE 240 Logic and Discrete Mathematics

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

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

Definition 2. Conjunction of p and q

Chapter 3: Logic. Diana Pell. A statement is a declarative sentence that is either true or false, but not both.

Today s Lecture 2/9/10. Symbolizations continued Chapter 7.2: Truth conditions for our logical operators

ANALYSIS EXERCISE 1 SOLUTIONS

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

THE LOGIC OF COMPOUND STATEMENTS

Section 3.1. Statements and Logical Connectives. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

CSE 311: Foundations of Computing I. Spring 2015 Lecture 1: Propositional Logic

1 Propositional Logic

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Connectives Name Symbol OR Disjunction And Conjunction If then Implication/ conditional If and only if Bi-implication / biconditional

Propositional Logic. Propositional Equivalences. Agenda. Yutaka HATA, IEEE Fellow. Ch1.1 Propositional Logic. Ch1.2 Propositional Equivalences

Chapter 4, Logic using Propositional Calculus Handout

A Statement; Logical Operations

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

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

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:

Math 2534 Solution Homework 2 Spring 2017

Logic and Proof. Aiichiro Nakano

Chapter 1 Elementary Logic

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

1.1 Language and Logic

Transcription:

Introduction Propositional Logic Discrete Mathematics Andrei Bulatov

Discrete Mathematics Propositional Logic 2-2 What is Logic? Computer science is a mere continuation of logic by other means Georg Gottlob Contrariwise, continued Tweedledee, if it was so, it might be; and if it were so, it would be; but as it isn t, it ain t. That s logic Lewis Carroll, Through the Looking Glass Logic celebrates the unity of a pathological masculine self-identity that cannot listen and recognizes only negation but not difference Andrea Nye, Words of Power

Discrete Mathematics Propositional Logic 2-3 Use of Logic In mathematics and rhetoric: Give precise meaning to statements. Distinguish between valid and invalid arguments. Provide rules of `correct reasoning. Natural language can be very ambiguous `If you do your homework, then you ll get to watch the game. `If you don t do your homework, then you will not get to watch... `You do your homework, or you ll fail the exam. = `If you don t do your homework, then you ll fail the exam.

Discrete Mathematics Propositional Logic 2-4 Use of Logic (cntd) In computing: Derive new data / knowledge from existing facts Design of computer circuits. Construction of computer programs. Verification of correctness of programs and circuit design. Specification What the customer really needed How the Programmer understood it What the customer got

Discrete Mathematics Propositional Logic 2-5 Statements (Propositions) Propositional logic deals with statements and their truth values A statement is a declarative sentence that can be true or false Truth values are TRUTH (T or 1) and FALSE (F or 0). Examples: - 1 + 1 = 2 (statement, T) - The moon is made of cheese (statement, F) - Go home! (not statement, imperative) - What a beautiful garden! (not statement, exclamation) - y + 1 = 2 (not statement, uncertain) - The God exists (statement,?)

Discrete Mathematics Propositional Logic 2-6 Compound Statements Simplest statements are called primitive statements We shall use propositional variables to denote primitive statements, p, q, r, We cannot decide the truth value of a primitive statement. This is not what logic does. Instead we combine primitive statements by means of logic connectives into compound statements or formulas and look how the truth value of a compound statement depends on the truth values of the primitive statements it includes. We will denote compound statements by Φ, Ψ,

Discrete Mathematics Propositional Logic 2-7 Logic Connectives negation (not, ) `It is not true that at least one politician was honest conjunction (and, ) `In this room there is a lady, and in the other room there is a tiger disjunction (or, ) `Margaret Mitchell wrote `Gone with the Wind or I am going home implication (if, then, ) `If there is a tiger in this room, then there is no lady there exclusive or (either, or, ) `There is either a tiger in this room, or a lady biconditional (equivalence) (if and only if, ) `There is a lady in this room if and only if there is a tiger in the other room

Discrete Mathematics Propositional Logic 2-8 Truth Tables Truth table is a way to specify the exact dependence of the truth value of a compound statement through the values of primitive statements involved truth values of primitive statements (propositional variables) p q Φ 0 0 0 0 1 1 truth value of compound statements (formulas)

Discrete Mathematics Propositional Logic 2-9 Truth Tables of Connectives (Negation and Conjunction) Negation p p F (0) T (1) T (1) F (0) unary connective `Today is Friday `Today is not Friday Conjunction p q p q 0 0 0 0 1 0 1 0 0 1 1 1 binary connective `Today is Friday `It is raining `Today is Friday and it is raining

Discrete Mathematics Propositional Logic 2-10 Truth Tables of Connectives (Disjunction) Disjunction inclusive `or p q p q 0 0 0 0 1 1 1 0 1 1 1 1 `Students who have taken calculus can take this course `Students who have taken computing can take this course `Students who have taken calculus or computing can take this course Be careful with `or constructions in natural languages! `You do your homework, or you ll fail the exam. `Today is Friday or Saturday

Discrete Mathematics Propositional Logic 2-11 Truth Tables of Connectives (Exclusive or) Exclusive `or One of the statements is true but not both p q p q 0 0 0 0 1 1 1 0 1 1 1 0 `You can follow the rules or be disqualified. `Natalie will arrive today or Natalie will not arrive at all.

Discrete Mathematics Propositional Logic 2-12 Truth Tables of Connectives (Implication) Implication p q p q 0 0 1 0 1 1 1 0 0 1 1 1 Note that logical (material) implication does not assume any causal connection. `If black is white, then we live in Antarctic. If pigs fly, then Paris is in France.

Discrete Mathematics Propositional Logic 2-13 Implication as a Promise Implication can be thought of as a promise, and it is true if the promise is kept `If I am elected, then I will lower taxes - He is not elected and taxes are not lowered promise kept! - He is not elected and taxes are lowered promise kept! - He is elected, but (=and) taxes are not lowered promise broken! - He is elected and taxes are lowered promise kept!

Discrete Mathematics Propositional Logic 2-14 Playing with Implication Parts of implication p q hypothesis antecedent premise conclusion consequence `if p, then q `if p, q `p is sufficient for q `q if p `q when p `q unless p `p implies q `p only if q `q whenever p `q follows from p `a sufficient condition for q is p `a necessary condition for p is q

Discrete Mathematics Propositional Logic 2-15 Playing with Implication (cntd) Converse, contrapositive, and inverse p q Converse `The home team wins whenever it is raining (`If it is raining then the home team wins ) q p `If the home team wins, then it is raining Contrapositive q p `If the home team does not win, then it is not raining Inverse p q `If it is not raining, then the home team does not win

Discrete Mathematics Propositional Logic 2-16 Truth Tables of Connectives (Biconditional) Biconditional or Equivalence One of the statements is true if and only if the other is true p q p q 0 0 1 0 1 0 1 0 0 1 1 1 `You can take the flight if and only if you buy a ticket.

Discrete Mathematics Propositional Logic 2-17 Example `You can access the Internet from campus if you are a computer science major or if you are not a freshman. p - `you can access the Internet from campus q - `you are a computer science major r - `you are a freshman

Discrete Mathematics Propositional Logic 2-18 Homework Exercises from the Book: No. 1,3, 4, 8a, 8c (page 54)