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

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

CSC Discrete Math I, Spring Propositional Logic

Compound Propositions

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

Proofs. Joe Patten August 10, 2018

DISCRETE STRUCTURES WEEK5 LECTURE1

PROPOSITIONAL CALCULUS

Chapter 4: Classical Propositional Semantics

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

Introduction to Sets and Logic (MATH 1190)

Lecture 7. Logic. Section1: Statement Logic.

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

Learning Goals of CS245 Logic and Computation

Chapter 1, Section 1.1 Propositional 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

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

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

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

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

Truth-Functional Logic

Propositional Logic. Spring Propositional Logic Spring / 32

Natural Deduction for Propositional Logic

CSE 20: Discrete Mathematics

Comp487/587 - Boolean Formulas

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

Discrete Mathematics and Its Applications

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

Logic. Readings: Coppock and Champollion textbook draft, Ch

1.1 Language and Logic

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

Artificial Intelligence. Propositional logic

Discrete Structures of Computer Science Propositional Logic I

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

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

Definition 2. Conjunction of p and q

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Section 1.1: Logical Form and Logical Equivalence

Introduction to first-order logic:

2.2: Logical Equivalence: The Laws of Logic

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

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

Chapter 1: Formal Logic

Math 10850, fall 2017, University of Notre Dame

Packet #1: Logic & Proofs. Applied Discrete Mathematics

We last time we began introducing equivalency laws.

Propositional Logic: Semantics

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

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

Supplementary exercises in propositional logic

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

THE LOGIC OF COMPOUND STATEMENTS

Discrete Mathematics and Applications COT3100

Introduction to Decision Sciences Lecture 2

Tecniche di Verifica. Introduction to Propositional Logic

Propositional Logic Language

Propositional Logic: Models and Proofs

Logic and Discrete Mathematics. Section 3.5 Propositional logical equivalence Negation of propositional formulae

Propositional and Predicate Logic - II

3 Propositional Logic

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

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

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

Discrete Mathematics

1.1 Language and Logic

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

A brief introduction to Logic. (slides from

Propositional Logic and Semantics

1 Propositional Logic

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.

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

Logic and Proofs. (A brief summary)

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

Introduction. Applications of discrete mathematics:

Syntax of propositional logic. Syntax tree of a formula. Semantics of propositional logic (I) Subformulas

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

Propositional Logic: Equivalence

Propositional Language - Semantics

Equivalence and Implication

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

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Logic and Propositional Calculus

PHIL12A Section answers, 16 February 2011

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

Digital Logic Design: a rigorous approach c

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

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

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

More Propositional Logic Algebra: Expressive Completeness and Completeness of Equivalences. Computability and Logic

UNIT-I: Propositional Logic

Propositional Logic. Fall () Propositional Logic Fall / 30

15414/614 Optional Lecture 1: Propositional Logic

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

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

Chapter 4, Logic using Propositional Calculus Handout

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

ARTIFICIAL INTELLIGENCE

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

Transcription:

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies Valentin Stockholm University September 2016

Propositions Proposition: statement which can be assigned a (unique) truth value: true or false. Some examples of propositions: The Sun is hot. The Moon is made of cheese. Two plus two equals twenty two. The 1001st decimal digit of the number π is 7. Some non-examples: Are you bored? Please, don t go away! She loves me. x is an integer. This sentence is false.

Propositional logical connectives not, called negation, denoted by ; and, called conjunction, denoted by (or, sometimes by &); or, called disjunction, denoted by ; if... then..., called implication, or conditional, denoted by ;... if and only if..., called equivalence, or biconditional, denoted by.

Using the propositions Building composite propositions Two plus two equals five and The sun is hot and the propositional connectives, we can produce: It is not the case that two plus two equals five Two plus two equals five and the sun is hot Two plus two equals five or the sun is hot If two plus two equals five then the sun is hot Two plus two equals five if and only if the sun is hot Likewise, using the propositions Logic is fun, Logic is boring, Logic is easy we can produce the composite proposition: Logic is not fun or, if Logic is easy then Logic is fun and Logic is not boring.

The propositional connectives as truth value functions Each propositional connective acts on the truth values of the component propositions in a precise way: A is true if and only if A is false. A B is true if and only if both A and B are true. A B is true if and only if either of A or B (possibly both) is true. A B is true if and only if the truth of A implies the truth of B, i.e., iff A is false or B is true. A B is true if and only if A and B have the same truth-values.

Truth tables These rules can be summarized in the following truth tables, where T stands for true and stands for false : p p T F F T p q p q p q p q p q T T T T T T T F F T F F F T F T T F F F F F T T

Applying the truth tables Given that Two plus two equals five is false and The Sun is hot is true, using the truth-tables we obtain that: It is not the case that two plus two equals five is true; Two plus two equals five and the Sun is hot is false; Two plus two equals five or the Sun is hot is true; If two plus two equals five, then the Sun is hot is true. If two plus two equals five if and only if the Sun is hot is true.

Some comments on the truth tables Conjunction is commutative: A B is equally true as B A. But, these do not always mean the same! Compare Bill pulled the trigger and Jack dropped dead with Jack dropped dead and Bill pulled the trigger. Disjunction is non-exclusive: I shall win or I shall die is still true if I both win and die. Compare also with I shall win unless I die. Implication is the most confusing of all. Why should False imply true and False imply false be true? Because there is no good reason to declare them false! The implication A B claims the truth of B only if A is true, else no claim is made. Thus, the implication A B is false in only one case: when A is true and yet B is false.

Some equivalent forms of the implication The implication is the most important and versatile propositional connective. It can appear in variety of phrases: If A then B A implies B A only if B B whenever A B if A A is sufficient for B B is necessary for A

Suppose that Computing the truth value of a proposition Logic is fun. : T; Logic is boring. : F; Logic is easy. : T; To compute the truth value of the composite proposition: Logic is not fun or, if Logic is easy then Logic is fun and Logic is not boring. we first write it in a symbolic form. For that, we first analyse and clarify it syntax, by placing auxiliary parentheses to indicate the order of applying the logical connectives: (Logic is not fun) or (if Logic is easy then (Logic is fun and Logic is not boring)).

Computing the truth value of a proposition, cont d We now introduce symbolic names for the atomic propositions occurring in it, e.g: A : Logic is fun. B : Logic is boring. C : Logic is easy. Then, the proposition can be written symbolically as: ( A) (C (A B)) Now, we compute its truth value step by step, applying the truth-tables of the respective logical connectives: ( T) (T (T F)) = F (T (T T)) = F (T T) = F T = T.

Propositional formulae Propositional constants: which represents a true proposition, and which represents a false proposition. Propositional variables: variables that range over propositions. Usually denoted by p, q, r, possibly with indices. Inductive definition of propositional formulae: 1. Every propositional constant and every propositional variable is a propositional formula. 2. If A is a propositional formula then A is a propositional formula. 3. If A, B are propositional formulae then (A B), (A B), (A B), (A B) are propositional formulae. Examples:,, p, p, p, q, (p q), (p 1 (p 2 p 1 )),... Outermost pairs of parentheses will often be omitted.

Construction trees, subformulae, main connectives Construction tree: a tree with nodes labelled with propositional constants, variables, and propositional connectives, such that: 1. Every leaf is labelled by a propositional constant or variable. 2. Propositional constants and variables label only leaves. 3. Every node labelled with has exactly one successor node. 4. Every node labelled with any of,,, has exactly two successor nodes - left and right successor. Every construction tree defines a formula C, built starting from the leaves and going towards the root, by applying at every node the formula construction rule corresponding to the label at that node.

Construction tree of a formula Leaves: propositional variables or constants unary connective ( ) binary connective (,,, ) the main connective The formulae constructed in the process are the subformulae of C. The connective labelling the root of the construction tree of a formula C is the main connective of C.

Construction tree: example Formula: Construction tree (p (q r)) r r q r p V

Parsing tree of a formula The parsing tree of a formula looks the same as the construction tree, but is produced in inverse order, starting from the main connective (of any), drawing edges to all main components, and then recursively producing the parsing trees for each of them. Leaves: propositional variables or constants unary connective ( ) binary connective (,,, ) the main connective

Formula: Parsing tree Parsing tree: example (p (q r)) r r q r p V

Truth tables of propositional formulae Example: (p (q r)) r p q r r r q r (q r) p (q r) (p (q r)) r T T T F T F T T T T T F T F T F T F T F T F T F T T T T F F T F F T T F F T T F T F T T T F T F T F T F F T F F T F F F

Simplified truth tables p q r (p (q r)) r T T T T T T T F F T T T F T T T F T T F T T T F F F T F T F T T T T F F F T T T F T T F F T T T F F T F F F T F F T T F T T T F F T T T F T F T F F F F T T T F T F T F F F T F F F

Tautologies Tautology (or, propositionally valid formula): a formula that obtains truth value T for every assignment of truth values to the occurring variables. Notation: = A. Examples: = p p, = (p p), = ((p (p q)) q) Testing tautologies with truth-tables: p q p q p (p q) (p (p q)) q T T T T T T F F F T F T T F T F F T F T

Contradictions, satisfiable formulae Contradiction is a formula that always takes truth value F. Examples: p p, ((p q) p) Thus, the negation of a tautology is a contradiction and the negation of a contradiction is a tautology. A formula is satisfiable if it is not a contradiction. Example: p, p q, etc.