Copyright © Peter Cappello Propositional Logic. Copyright © Peter Cappello Sentence Restrictions Building more precise tools from less precise tools Precise.

Slides:



Advertisements
Similar presentations
Logic The study of correct reasoning.
Advertisements

TRUTH TABLES Section 1.3.
1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: The Moon is made of green cheese. Trenton.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Copyright © Peter Cappello 2013 Propositional Logic.
Propositional Logic.
Conditional Statements
Propositional Logic Lecture 2: Sep 9. Conditional Statement If p then q p is called the hypothesis; q is called the conclusion “If your GPA is 4.0, then.
CSE 311 Foundations of Computing I Autumn 2011 Lecture 2 More Propositional Logic Application: Circuits Propositional Equivalence.
Propositional Logic 7/16/ Propositional Logic A proposition is a statement that is either true or false. We give propositions names such as p, q,
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Propositional Logic.
Propositions and Truth Tables
Section 1.5 Implications. Implication Statements If Cara has a piano lesson, then it is Friday. If it is raining, then I need to remember my umbrella.
The Foundations: Logic and Proofs
Section 1-4 Logic Katelyn Donovan MAT 202 Dr. Marinas January 19, 2006.
Chapter 8 Logic DP Studies. Content A Propositions B Compound propositions C Truth tables and logical equivalence D Implication and equivalence E Converse,
Discrete Maths 2. Propositional Logic Objective
MATH 213 A – Discrete Mathematics for Computer Science Dr. (Mr.) Bancroft.
Discrete Mathematics and Its Applications
CS 285- Discrete Mathematics Lecture 2. Section 1.1 Propositional Logic Propositions Conditional Statements Truth Tables of Compound Propositions Translating.
Chapter 1: The Foundations: Logic and Proofs
Foundations of Computing I CSE 311 Fall CSE 311: Foundations of Computing I Fall 2014 Lecture 1: Propositional Logic.
© Jalal Kawash 2010 Logic Peeking into Computer Science.
Propositional Logic Dr. Yasir Ali. Formal or propositional logic was first developed by the ancient Greeks, who wanted to be able to reason carefully.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
1 Introduction to Abstract Mathematics The Logic and Language of Proofs Instructor: Hayk Melikya Proposition: Informal introduction to.
Chapter 5 – Logic CSNB 143 Discrete Mathematical Structures.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Discrete Mathematics Lecture1 Miss.Amal Alshardy.
CSNB143 – Discrete Structure LOGIC. Learning Outcomes Student should be able to know what is it means by statement. Students should be able to identify.
Lecture 4. CONDITIONAL STATEMENTS: Consider the statement: "If you earn an A in Math, then I'll buy you a computer." This statement is made up of two.
LOGIC Lesson 2.1. What is an on-the-spot Quiz  This quiz is defined by me.  While I’m having my lectures, you have to be alert.  Because there are.
Chapter 7 Logic, Sets, and Counting
Conditional Statements
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
MAIN TOPIC : Statement, Open Sentences, and Truth Values Negation Compound Statement Equivalency, Tautology, Contradiction, and Contingency Converse, Inverse,
How do I show that two compound propositions are logically equivalent?
Chapter 7 Logic, Sets, and Counting Section 1 Logic.
6.1 Logic Logic is not only the foundation of mathematics, but also is important in numerous fields including law, medicine, and science. Although the.
Propositional Logic ITCS 2175 (Rosen Section 1.1, 1.2)
1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. 
Section 1.1. Section Summary Propositions Connectives Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional Truth.
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Logic The Lost Art of Argument. Logic - Review Proposition – A statement that is either true or false (but not both) Conjunction – And Disjunction – Or.
Joan Ridgway. If a proposition is not indeterminate then it is either true (T) or false (F). True and False are complementary events. For two propositions,
Mathematics for Comter I Lecture 2: Logic (1) Basic definitions Logical operators Translating English sentences.
رياضيات متقطعة لعلوم الحاسب MATH 226. Text books: (Discrete Mathematics and its applications) Kenneth H. Rosen, seventh Edition, 2012, McGraw- Hill.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
Conditional Statements Lecture 2 Section 1.2 Fri, Jan 20, 2006.
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Conditional statement or implication IF p then q is denoted p ⇒ q p is the antecedent or hypothesis q is the consequent or conclusion ⇒ means IF…THEN.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 01: Boolean Logic Sections 1.1 and 1.2 Jarek Rossignac.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
Chapter 1 Logic and proofs
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Simple Logic.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Logic.
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Applications of Propositional Logic
CS 220: Discrete Structures and their Applications
(1.4) An Introduction to Logic
CSS 342 Data Structures, Algorithms, and Discrete Mathematics I
Discrete Mathematics and Its Applications Kenneth H
Discrete Mathematics Lecture 2: Propositional Logic
MAT 3100 Introduction to Proof
Presentation transcript:

Copyright © Peter Cappello Propositional Logic

Copyright © Peter Cappello Sentence Restrictions Building more precise tools from less precise tools Precise use of natural language is difficult.Precise use of natural language is difficult. We want a sublanguage suited to precision.We want a sublanguage suited to precision. Restrict discussion to sentences that are:Restrict discussion to sentences that are: declarative either true or false but not both. Such sentences are called propositions.Such sentences are called propositions.

Copyright © Peter Cappello Examples of Propositions Which of the sentences below are propositions? “Mastercharge, dig me into a hole!” “Peter Cappello thinks this class is fascinating.” “Do I exist yet?” “This sentence is false.”

Copyright © Peter Cappello Not Operator Not ( ~ ): p is true exactly when ~p is false.Not ( ~ ): p is true exactly when ~p is false. Let p denote “This class is the greatest entertainment since Game of Thrones.”Let p denote “This class is the greatest entertainment since Game of Thrones.” ~p denotes “It is not the case that this class is the greatest entertainment since Game of Thrones.”~p denotes “It is not the case that this class is the greatest entertainment since Game of Thrones.”

Copyright © Peter Cappello Or Operator (Disjunction) Or (  ): proposition p  q is true exactly when either p is true or q is true:

Copyright © Peter Cappello And Operator (Conjunction) And (  ): proposition p  q is true exactly when p is true and q is true:

Copyright © Peter Cappello If and Only If Operator (IFF) If and only if (  ): proposition p  q is true exactly when (p  q) or (~ p  ~ q):

Copyright © Peter Cappello Exclusive-Or Exclusive-or (  ) is the negation of .

Copyright © Peter Cappello Implies Operator (If … Then) Implies (  ): proposition p  q is true exactly when p is false or q is true:Implies (  ): proposition p  q is true exactly when p is false or q is true:

Copyright © Peter Cappello If … Then... Example: “If pigs had wings they could fly.”Example: “If pigs had wings they could fly.” In English, implies normally connotes a causal relation:In English, implies normally connotes a causal relation: p implies q means that p causes q to be true. Not so with the mathematical definition!Not so with the mathematical definition! If 1  1 then Peter hates Family Guy.

Copyright © Peter Cappello Converse & Inverse The converse of p  q is q  p.The converse of p  q is q  p. The inverse of p  q is ~p  ~q.The inverse of p  q is ~p  ~q. The contrapositive of p  q is ~q  ~p.The contrapositive of p  q is ~q  ~p. If p  q then which, if any, is always true:If p  q then which, if any, is always true: Its converse? Its inverse? Its contrapositive? Use a truth table to find the answer. Describe the contrapositive of p  q in terms of the converse & inverse.Describe the contrapositive of p  q in terms of the converse & inverse. Compare the truth tables of the converse & inverse.Compare the truth tables of the converse & inverse.

Copyright © Peter Cappello p  q may be expressed as p implies q if p then q q if p q follows from p q provided p q is a consequence of p q whenever p p is a sufficient condition for q p only if q (if ~q then ~p) q is a necessary condition for p (if ~q then ~p)

Copyright © Peter Cappello Abstraction Capture the logical form of a Proposition in English Let g, h, and b be propositions:Let g, h, and b be propositions: g: Grizzly bears have been seen in the area. h: Hiking is safe on the trail. b: Berries are ripe along the trail. Translate the following sentence using g, h, and b, and logical operators:Translate the following sentence using g, h, and b, and logical operators: If berries are ripe along the trail, hiking is safe on the trail if and only if grizzly bears have not been seen in the area.

Copyright © Peter Cappello 1.If berries are ripe along the trail, hiking is safe on the trail if and only if grizzly bears have not been seen in the area. 2.If b, ( h if and only if  g ). 3. b  ( h   g ).

Copyright © Peter Cappello Truth Table of a Compound Proposition bhg  g g g g h   gh   gh   gh   g b  ( h   g ) TTT TTF TFT TFF FTT FTF FFT FFF

System Specification Systems are increasing in complexity.Systems are increasing in complexity. e.g., software, hardware, workflow, security, legal Can we know that a system works as intended?Can we know that a system works as intended? 1.Specify a set of desired system properties Each property is expressed as a compound proposition. 2.Verify that such a system is feasible. All compound propositions are simultaneously satisfiable. Z specification languageZ specification language Allow: Copyright © Peter Cappello

Knights & Knaves An island’s only inhabitants are knights (truth tellers) & knaves (liars).An island’s only inhabitants are knights (truth tellers) & knaves (liars). You are approached by 2 inhabitants, A & B.You are approached by 2 inhabitants, A & B. Determine, if possible, what A & B are, if B says nothing & A says:Determine, if possible, what A & B are, if B says nothing & A says: 1.“At least 1 of us is a knave.” 2.“I am a knave or B is a knight.” 3.“We are both knaves.” Copyright © Peter Cappello

1.“At least 1 of us is a knave.” A is a knight; B is a knave. 2.“I am a knave or B is a knight.” A & B are knights 3.“We are both knaves.” A is a knave; B is a knight. Copyright © Peter Cappello

Google Search Operators Query: “US states” “income tax rate” Beatles: “Taxman” (Query: Beatles Taxman) Let me tell you how it will be There's one for you, nineteen for me 'Cause I'm the taxman, yeah, I'm the taxman Should five per cent appear too small Be thankful I don't take it all 'Cause I'm the taxman, yeah I'm the taxman If you drive a car, I'll tax the street, If you try to sit, I'll tax your seat. If you get too cold I'll tax the heat, If you take a walk, I'll tax your feet. Don't ask me what I want it for If you don't want to pay some more 'Cause I'm the taxman, yeah, I'm the taxman Now my advice for those who die Declare the pennies on your eyes 'Cause I'm the taxman, yeah, I'm the taxman And you're working for no one but me. Copyright © Peter Cappello