Propositional Logic.

Slides:



Advertisements
Similar presentations
Exercises for CS1512 Weeks 7 and 8 Propositional Logic 1 (questions + solutions)
Advertisements

TRUTH TABLES Section 1.3.
TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
Preview of SL Logic Class 3. Either it is raining or it is snowing A A: It is raining B: It is snowing B  : Or 
Logic Use mathematical deduction to derive new knowledge.
Chapter Two Symbolizing in Sentential Logic This chapter is a preliminary to the project of building a model of validity for sentential arguments. We.
Goals Determine the true value of statements with AND, OR, IF..THEN. Negate statements with the connectives above Construct truth tables Understand when.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
Review: Logic of Categories = Categorical Logic.
Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The.
Today’s Topics n Review Logical Implication & Truth Table Tests for Validity n Truth Value Analysis n Short Form Validity Tests n Consistency and validity.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction.
The Foundations: Logic and Proofs
Intro to Discrete Structures
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
2009/9 1 Logic and Proofs §1.1 Introduction §1.2 Propositional Equivalences §1.3 Predicates and Quantifiers §1.4 Nested Quantifiers §1.5~7 Methods of Proofs.
Lecture for Week Spring.   Introduction to Propositional Logic  Types of Proposition  Operator and Truth table Agenda.
Chapter 1 The Logic of Compound Statements. Section 1.1 Logical Form and Logical Equivalence.
BY: MISS FARAH ADIBAH ADNAN IMK. CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC INTRODUCTION PROPOSITION COMPOUND STATEMENTS LOGICAL.
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Pratibha Sinha. aU msGg.
Copyright © Curt Hill Mathematical Logic An Introduction.
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 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.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Logic. Statements, Connectives, and Quantifiers In symbolic logic, we only care whether statements are true or false – not their content. In logic, a.
Logical Form and Logical Equivalence Lecture 1 Section 1.1 Wed, Jan 12, 2005.
1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. 
Chapter 1: The Foundations: Logic and Proofs
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
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.
Joan Ridgway. Basic Concepts of Symbolic Logic Mathematical logic deals with basic statements called propositions. The word “logic” derives from the Greek.
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.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Discrete Structures for Computer Science Presented By: Andrew F. Conn Slides adapted from: Adam J. Lee Lecture #1: Introduction, Propositional Logic August.
Logical functors and connectives. Negation: ¬ The function of the negation is to reverse the truth value of a given propositions (sentence). If A is true,
Chapter 1 Propositional Logic
Symbolic Logic Pratibha Sinha.
Propositional Logic (a.k.a. Sentential Logic)
Logic.
CSNB 143 Discrete Mathematical Structures
Knowledge Representation and Reasoning
CS 202, Spring 2008 Epp, sections 1.1 and 1.2
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
COT 3100, Spr Applications of Discrete Structures
ARTIFICIAL INTELLIGENCE
Truth Tables – Logic (Continued)
The Boolean Connectives
The Foundations: Logic and Proofs
Principles of Computing – UFCFA3-30-1
Symbolic Logic Pratibha Sinha.
Chapter 8 Logic Topics
Information Technology Department
Logics for Data and Knowledge Representation
CS 220: Discrete Structures and their Applications
TRUTH TABLES.
Applied Discrete Mathematics Week 1: Logic
Back to “Serious” Topics…
The Logic of Declarative Statements
Propositional Logic Computational Logic Lecture 2
Logical Entailment Computational Logic Lecture 3
Chapter 7. Propositional and Predicate Logic
TRUTH TABLES.
Section 3.2 Truth Tables for Negation, Conjunction, and Disjunction
Logical and Rule-Based Reasoning Part I
Propositional Logic Computational Logic Lecture 2
Concepts of Computation
Presentation transcript:

Propositional Logic

Propositional Languages A propositional signature is a set/sequence of primitive symbols, called proposition constants. Given a propositional signature, a propositional sentence is either (1) a member of the signature or (2) a compound expression formed from members of the signature. (Details to follow.) A propositional language is the set of all propositional sentences that can be formed from a propositional signature. 10/14/16

Proposition Constants By convention (in this course), proposition constants are written as strings of alphanumeric characters beginning with a lower case letter. Examples: raining r32aining rAiNiNg rainingorsnowing Non-Examples: 324567 raining.or.snowing 10/14/16

Compound Sentences Negations: ¬raining The argument of a negation is called the target. Conjunctions: (raining ∧ snowing) The arguments of a conjunction are called conjuncts. Disjunctions: (raining ∨ snowing) The arguments of a disjunction are called disjuncts. 10/14/16

Compound Sentences (concluded) Implications: (raining ⇒ cloudy) The left argument of an implication is the antecedent. The right argument is the consequent. Reductions: (cloudy ⇐ raining) The left argument of a reduction is the consequent. The right argument of a reduction is the antecedent. Equivalences: (cloudy ⇔ raining) 10/14/16

Parenthesis Removal Dropping Parentheses is good: (p ∧ q) → p ∧ q But it can lead to ambiguities: ((p ∨ q) ∧ r) → p ∧ q ∨ r (p ∨ (q ∧ r)) → p ∧ q ∨ r 10/14/16

Precedence Parentheses can be dropped when the structure of an expression can be determined by precedence. ¬ ∧ ∨ ⇒ ⇐ ⇔ NB: An operand associates with operator of higher precedence. If surrounded by operators of equal precedence, the operand associates with the operator to the right. p ∧ q ∨ r p ⇒ q ⇒ r ¬p ∧ q p ∨ q ∧ r p ⇒ q ⇐ r 10/14/16

Example o ⇔ (p ∧ ¬q) ∨ (¬p ∧ q) a ⇔ r ∧ o b ⇔ p ∧ q s ⇔ (o ∧ ¬r) ∨ (¬o ∧ r) c ⇔ a ∨ b p q r s c o a b 10/14/16

(r ∧ ((p ∧ ¬q) ∨ (¬p ∧ q))) ∨ (p ∧ q) Example (r ∧ ((p ∧ ¬q) ∨ (¬p ∧ q))) ∨ (p ∧ q) p q r 10/14/16

Propositional Interpretation A propositional interpretation is an association between the propositional constants in a propositional language and the truth values T or F. We sometimes view an interpretation as a Boolean vector of values for the items in the signature of the language (when the signature is ordered). i = TFT 10/14/16

Sentential Interpretation A sentential interpretation is an association between the sentences in a propositional language and the truth values T or F. pi = T (p ∨ q)i = T qi = F (¬q ∨ r)i = T ri = T ((p ∨ q) ∧ (¬q ∨ r))i = T A propositional interpretation defines a sentential interpretation by application of operator semantics. 10/14/16

Operator Semantics Negation: For example, if the interpretation of p is F, then the interpretation of ¬p is T. For example, if the interpretation of (p∧q) is T, then the interpretation of ¬(p∧q) is F. 10/14/16

Operator Semantics (continued) Conjunction: Disjunction: NB: The type of disjunction here is called inclusive or, which says that a disjunction is true if and only if at least one of its disjuncts is true. This contrasts with exclusive or, which says that a disjunction is true if and only if an odd number of its disjuncts is true. 10/14/16

Operator Semantics (continued) Implication: Reduction: NB: The semantics of implication here is called material implication. Any implication is true if the antecedent is false, whether or not there is a connection to the consequent. If George Washington is alive, I am a billionaire. 10/14/16

Operator Semantics (concluded) Equivalence: 10/14/16

Evaluation Interpretation i: Compound Sentence (p ∨ q) ∧ (¬q ∨ r) 10/14/16

(r ∧ ((p ∧ ¬q) ∨ (¬p ∧ q))) ∨ (p ∧ q) Example pi = T qi = T ri = T (r ∧ ((p ∧ ¬q) ∨ (¬p ∧ q))) ∨ (p ∧ q) p q r 10/14/16

Multiple Interpretations Logic does not prescribe which interpretation is “correct”. In the absence of additional information, one interpretation is as good as another. Interpretation i Interpretation j Examples: Different days of the week Different locations Beliefs of different people 10/14/16

Truth Tables A truth table is a table of all possible interpretations for the propositional constants in a language. One column per constant. One row per interpretation. For a language with n constants, there are 2n interpretations. 10/14/16

Properties of Sentences Valid Contingent Unsatisfiable A sentence is valid if and only if every interpretation satisfies it. A sentence is contingent if and only if some interpretation satisfies it and some interpretation falsifies it. A sentence is unsatisfiable if and only if no interpretation satisfies it. 10/14/16

Properties of Sentences Valid Contingent Unsatisfiable } A sentences is satisfiable if and only if it is either valid or contingent. A sentences is falsifiable if and only if it is contingent or unsatisfiable. } 10/14/16

Example of Validity 10/14/16

(p ⇒ (q ⇒ r)) ⇒ ((p ⇒ q) ⇒ (p ⇒ r)) More Validities Double Negation: p ⇔ ¬¬p deMorgan's Laws: ¬(p∧q) ⇔ (¬p∨¬q) ¬(p∨q) ⇔ (¬p∧¬q) Implication Introduction: p ⇒ (q ⇒ p) Implication Distribution (p ⇒ (q ⇒ r)) ⇒ ((p ⇒ q) ⇒ (p ⇒ r)) 10/14/16

Evaluation Versus Satisfaction 10/14/16

((r ∧ ((p ∧ ¬q) ∨ (¬p ∧ q))) ∨ (p ∧ q))i = T Example pi = ? qi = ? ri = ? ((r ∧ ((p ∧ ¬q) ∨ (¬p ∧ q))) ∨ (p ∧ q))i = T p q r 10/14/16

Satisfaction Method to find all propositional interpretations that satisfy a given set of sentences: Form a truth table for the propositional constants. (2) For each sentence in the set and each row in the truth table, check whether the row satisfies the sentence. If not, cross out the row. (3) Any row remaining satisfies all sentences in the set. (Note that there might be more than one.) 10/14/16

Satisfaction Example q⇒r 10/14/16

Satisfaction Example (continued) q⇒r p ⇒q∧r 10/14/16

Satisfaction Example (concluded) q⇒r p ⇒q∧r ¬r What if we were to add p to this set? 10/14/16

Axiomatizability A set of boolean vectors of length n is axiomatizable in propositional logic if and only if there is a signature of size n and a set of sentences from the corresponding language such that the vectors in the set correspond to the set of interpretations satisfying the sentences. A set of sentences defining a set of vectors is called the axiomatization of the set of vectors. 10/14/16

Example Set of bit vectors: {TFF, FTF, FTT} Signature: {p, q, r} Axiomatization: (p ∧ ¬q ∧ ¬r) ∨ (¬p ∧ q) 10/14/16

The Big Game Stanford people always tell the truth, and Berkeley people always lie. Unfortunately, by looking at a person, you cannot tell whether he is from Stanford or Berkeley. You come to a fork in the road and want to get to the football stadium down one fork. However, you do not know which to take. There is a person standing there. What single question can you ask him to help you decide which fork to take? 10/14/16

Basic Idea 10/14/16

The Big Game Solved Question: The left road the way to the stadium if and only if you are from Stanford. Is that correct? 10/14/16