Logic As Algebra COMP1600 / COMP6260. Dirk Pattinson Australian National University. Semester 2, 2017

Save this PDF as:

Size: px
Start display at page:

Download "Logic As Algebra COMP1600 / COMP6260. Dirk Pattinson Australian National University. Semester 2, 2017"

Transcription

1 Logic As Algebra COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2017

2 Recap: And, Or, and Not x AND y x y x y x OR y x y x y NOT x x x / 41

3 Visualisation: Venn Diagrams the boxes are the space of all situations where x and y are true or false labelled circles describe those situations where x and y are true red area describes those situations where the formula is true. 2 / 41

4 Memories from High School... Analogy: Algebraic Terms. Given a set V of variables, algebraic terms are constructed as follows: 0, 1,... and all variables x V are algebraic terms if s and t are algebraic terms, then so is s + t and s t. Example. 5 + (3 x) x (x (3 (7 + 5))) + z Usual precendence. binds more strongly than +: x 3 + y reads as (x 3) + y Crucial Aspect. Terms can be evaluated given values for all variables. 3 / 41

5 Back to Boolean Functions Definition. Given a set of V of variables, boolean formulae are constructed as follows: T (true) and F (false) and all variables x V are boolean formulae if φ and ψ are boolean formulae, then so are φ ψ and φ ψ. if φ is a boolean formula, then so is φ. Examples. T (x ( y)) x x (T (F x) Precedence. binds more strongly than binds more strongly than : x y z reads as (( x) y) z Crucial Aspect. Boolean formulae can be evaluated given (boolean) values for all variables. 4 / 41

6 Equations Examples from Algebra. x (3 + y) = x 3 + x y 25 + (18 y) = 18 y + 25 Boolean Equations. have boolean formulae on the left and right: x (y x) = x T (y x) = x y Valid Equations. For all values of variables, LHS and RHS evaluate to same number. Applies to both algebraic terms and boolean formulae! 5 / 41

7 Valid Boolean Equations. Associativity a (b c) = (a b) c Commutativity a b = b a Absorption. a (a b) = a Identity. a F = a a (b c) = (a b) c a b = b a a (a b) = a a T = a Distributivity. a (b c) = (a b) (a c) a (b c) = (a b) (a c) Complements. a a = T a a = F 6 / 41

8 Equational Reasoning in Ordinary Algebra (x + 12) 3(x + 17) = (x + 12) (3 x ) (distributivity) = (x + 12) (3 x + 51) = x (3 x + 51) + 12 (3 x + 51) (distributivity) = x 3 x + x x ) (distributivity) = 3 x x + 36 x (commutativity) = 3 x 2 + ( ) x (distributivity) = 3 x x each step (other than addition / multiplication of numbers) justified by a law of arithmetic pattern matching against algebraic laws 7 / 41

9 Proving Boolean Equations Example. We prove the law of idempotence: x x = (x x) T (identity) = (x x) (x x) (complements) = x (x x) (distributivity) = x F (complements) x (identity) Rules of Reasoning. All boolean equations may be assumed (with variables substituted by formulae) may replace formulae with formulae that are proven equal equality is transitive! 8 / 41

10 Two faces of boolean Equations Truth of boolean equations: A boolean equation φ = ψ (where φ, ψ are boolean formulae) is true if φ and ψ evaluate to the same truth values, for all possible truth values of the variables that occur in φ and ψ. Equational Provability of boolean equations: A boolean equation is provable if it can be derived from associativity, commutativity, absorption, identity, distributivity and complements using the laws of equational reasoning. Q. How do these two notions hang together? 9 / 41

11 Soundness and Completeness Slightly Philosophical. Truth of an equation relates to the meaning (think: truth tables) of the connectives, and. Equational provability relates to a method that allows us to establish truth of an equation. They are orthogonal and independent ways to think about equations. Soundness. If a boolean equation φ = ψ is provable using equations, then it is true. all basic equations (associativity, distributivity,... ) are true the rules of equational reasoning preserve truth. Completeness. If a boolean equation is true, then it is provable using equations. more complex proof (not given here), using the so-called Lindenbaum Construction. 10 / 41

12 Challenge Problem: The De Morgan Laws De Morgan s Laws (x y) = x y (x y) = x y In English if it is false that either x or y is true, they must both be false if it is false that both x and y are true, then one of them must be false. Truth of De Morgan s Laws: Easy to establish via truth tables. Provability of De Morgan s Laws if the completeness theorem (that we didn t prove!) is true, then an equational proof must exist however, it is quite difficult to actually find it! 11 / 41

13 Criticism of Equational Proofs The good. Completeness tells us that if an equation is true, we can prove it. The bad. Sometimes need lots of ingenuity to find a proof! E.g. x x = (x x) T = (x x) (x x) = x (x x) = x F = x The ugly. Equational reasonign is not natural, i.e. it doesn t mirror the meaning of, and. 12 / 41

14 Towards Propositional Formulae and Natural Deduction New Connective. Implication, written In English. x y means if x is true, then so is y. Truth Table. Informally, think of x y as a promise. the promise is that y is true if x is true x y evaluates to F if the promise is broken x y x y F F 13 / 41

15 Towards Propositional Formulae and Natural Deduction New Connective. Implication, written In English. x y means if x is true, then so is y. Truth Table. Informally, think of x y as a promise. the promise is that y is true if x is true x y evaluates to F if the promise is broken x y x y F F T F T 13 / 41

16 Towards Propositional Formulae and Natural Deduction New Connective. Implication, written In English. x y means if x is true, then so is y. Truth Table. Informally, think of x y as a promise. the promise is that y is true if x is true x y evaluates to F if the promise is broken x y x y F F T F T T T F 13 / 41

17 Towards Propositional Formulae and Natural Deduction New Connective. Implication, written In English. x y means if x is true, then so is y. Truth Table. Informally, think of x y as a promise. the promise is that y is true if x is true x y evaluates to F if the promise is broken x y x y F F T F T T T F F T T 13 / 41

18 Towards Propositional Formulae and Natural Deduction New Connective. Implication, written In English. x y means if x is true, then so is y. Truth Table. Informally, think of x y as a promise. the promise is that y is true if x is true x y evaluates to F if the promise is broken x y x y F F T F T T T F F T T T 13 / 41

19 Interlude: Logic to English Exercise. Use the predicates I I m going surfing, Y you re going surfing, and W there ll be a big wave that kills us all, to translate the following statements to English: 1. I Y W 2. (I W ) (Y W ) Possible Answer. 14 / 41

20 Interlude: Logic to English Exercise. Use the predicates I I m going surfing, Y you re going surfing, and W there ll be a big wave that kills us all, to translate the following statements to English: 1. I Y W 2. (I W ) (Y W ) Possible Answer. 1. If both of us are goign surfing, then there ll be a big wave that kills us all. 14 / 41

21 Interlude: Logic to English Exercise. Use the predicates I I m going surfing, Y you re going surfing, and W there ll be a big wave that kills us all, to translate the following statements to English: 1. I Y W 2. (I W ) (Y W ) Possible Answer. 1. If both of us are goign surfing, then there ll be a big wave that kills us all. 2. If both of us are goign surfing, then there ll be a big wave that kills us all. (Both formulae have the same truth table!) 14 / 41

22 Propositional Formulae Definition. Given a set of V of variables, propositional formulae are constructed as follows: T (true) and F (false) and all variables x V are boolean formulae if φ and ψ are boolean formulae, then so are φ ψ and φ ψ and φ ψ if φ is a boolean formula, then so is φ. Precedence. binds more strongly than binds more strongly than binds more strongly than : x y z reads as ( x) (y z) Boolean Formulae vs Propositional Formulae propositional formulae are boolean formulae with addition of is expressible using boolean formulae: x y = x y but is included as implication is used very frequently 15 / 41

23 Contradictions and Contingencies Types of Propositional Formulae. A propositional formula is valid, if it evaluates to true under all truth value assignments. a contradiction if it evaluates to F under all truth value assignments, and a contingency if there are (necessarily different) truth value assigments for whic it evaluates to T and to F. Example. John had toast for breakfast is a contingency. John had toast for breakfast John had toast for breakfast is a contradiction. p ( q p) (p q) r can be complicated 16 / 41

24 Example proof using truth tables Statement to be proved: φ (p (q r)) ((p q) r)) For all 8 (= 2 3 ) possibilities of p, q, r, calculate truth value of the statement p q r q r p (q r) p q (p q) r φ T T T T T T T T T T F T T T T T T F T T T F T T T F F F F F F T F T T T F F T T F T F T F F F T F F T T F F T T F F F F F F F T Always exponential in size! 17 / 41

25 Natural Deduction Truth Tables. Can be exponential Equational Proofs. Can be very unintuitive Natural Deduction formal system that imitates human reasoning explains one connective at a time: intro and elim rules used to prove validity of formulae. also used in all formal theorem provers 18 / 41

26 Informal Proof Goal. Show that φ (p (q r)) (q s) p is valid. Informal Proof. 1. First,assume that p (q r) (is true) and show that (q s) p. 2. under this assumption, we have that p (is true). 3. still under this assumption, (q s) p (is true). 4. That is, p (q r) (q s) p without assumptions. Formal Natural Deduction Proof. 1 p (q r) Assumption 2 p -E, 1 3 (q s) p -I, 2 4 (p (q r)) ((q s) p) -I, / 41

27 Conjunction rules And Introduction ( -I) p q p q as p is true, and q is true, we have that p q is true. And Elimination ( -E) p q p p q q as p q is true, we have that p is true. as p q is true, we have that q is true. 20 / 41

28 Example Example. Commutativity of conjunction (derived rule) p q q p assuming that p q (is true), we (also) have that q p (is true). Informal Proof. 1. Assume that p q. 2. because of p q, we have p. 3. because of p q, we have q. 4. therefore, we also have q p. Natural Deduction Proof. 1 p q 2 p -E, 1 3 q -E, 1 4 q p -I, 2, 3 21 / 41

29 Implication rules Implication Introduction ( -I) [ p ]. q p q if q is true under the assumption p, then p q is true without the assumption p. [... ] means that the assumption p is discared (no longer made). Implication Elimination ( -E) p p q q if both p and p q hold (are true), then so does q. 22 / 41

30 Example - transitivity of implication (derived rule) p q q r We prove p r Informal Proof. 1. fix the assumption p q. 2. fix the assumption q r. 3. additionally assume p (and show r) 4. because p and p q, we have q. 5. because q and q r, we have r. 6. hence p r holds without assuming p Natural Deduction Proof. 1 p q 2 q r 3 p 4 q -E, 1, 3 5 r -E, 2, 4 6 p r -I, 3 5 lines 1 and 2 are assumptions, can be used anywhere line 3 is an assumption we make, can be used only in scope (l 3 5). 23 / 41

31 Aside: Justification of Proof Steps Silly Proof. (we prove what we already know!) 1 p q 2 p 3 q -E, 1, 2 4 p q -I, 2 3 Line Number Notation. -E,1,2 means that rule -E proves line 3 from lines 1 and 2 -I,2-3 means rule -I proves line 4 from the fact that we could assume line 2 and (using that assumption) prove line 3. In -I, 2 3 is the entire scope of the assumption p. 24 / 41

32 Rules involving assumptions 1 p q 2 q r 3 p 4 q -E, 1, 3 5 r -E, 2, 4 6 q r WRONG -I, 4, 5 statements inside the scope of an assumption depends on that assumption. we only know that they are true if the assumption is true! we have assumed p and proved q r, but q r depends on p. Indentation and vertical lines indicate scoping Similar to programming: p is a local variable. 25 / 41

33 Useless assumptions You can assume anything, but it might not be useful. 1 p q 2 q -E, 1 3 (p q) q -I, p You are a giraffe 2 You are a giraffe -E, 1 3 p You are a giraffe You are a giraffe -I, / 41

34 Disjunction rules Or Introduction ( -I) p p p q q p if p (holds), then so do p q and q p Or Elimination ( -E) [p] [q].. p q r r r assuming that we have a proof of p q and for the case that p holds, we have a proof of r for the case that q holds we have a proof of r then we have a proof of r just from p q. 27 / 41

35 -E template 1. know that p q 2. in case p is true... a. we know that r. b. and in case that q is true... c. we also know that r d. so we know r as long as p q! 1 p q 2 p.. a r b q.. c r r -E, 1, 2 a, b c 28 / 41

36 Example: commutativity of disjunction (derived rule) p q q p Informal Proof. 1. fix the assumption p q. 2. first assume that p is true. 3. then also have that q p. 4. now assume that q is true. 5. then also have that q p. 6. hence q p, without assuming either p or q. Natural Deduction Proof. 1 p q 2 p 3 q p -I, 2 4 q 5 q p -I, 4 6 q p -E, 1, 2 3, / 41

37 Negation and Truth Rules not introduction ( -I) not elimination ( -E) [p] p p. F F p if assuming p gives a contradiction, p is wrong so p must hold. Proof by Contradiction (PC) Truth [ p] F. p to prove p, assume p and derive a contradiction. truth, i.e. T, can always be established without assumptions. T 30 / 41

38 Example: double negation introduction (derived rule) p p Informal Proof. It is raining It is not the case that is is not raining Natural Deduction Proof. 1. Fix the assumption p. 2. additionally assume that p. 3. then F as p and p (under assn p) 4. hence p is contradictory, so p. 1 p 2 p 3 F E, 1, 2 4 p I, / 41

39 Example: contradiction elimination (derived rule) Anything follows form a contradiction F q 1 F 2 q 3 F R, 1 4 q PC, 2 3 R stands for repeat. F holds and continues to hold within the scope of the assumption q. assuming q a technical trick. 32 / 41

40 Example: double negation elimination (derived rule) p p 1 p 2 p 3 F E, 1, 2 4 p PC, / 41

41 Equivalence p q means p is true if and only if q is true We can make the definition p q (p q) (q p) which would naturally give us these rules introduction rule: p q q p elimination rules: p q p q p q p q q p 34 / 41

42 Equivalence Rules Alternatively we can get rules which don t involve the symbol -I ( introduction) [p] [q] -E ( elimination).. q p p q p q p p q q p Note the similarities to the -I and -E rules q 35 / 41

43 Which rule to use next? Guided by the form of your goal, and what you already have proved form ie, look at the connective:,,, always can consider using PC (proof by contradiction) to prove p q, -I (or introduction) may not work p p q q p q p may not be necessarily true, q may not be necessarily true 36 / 41

44 To prove p q, sometimes you need to do this: 1. Using PC, assume (p q) (hoping to prove some contradiction) 2. When is (p q) true? When both p and q false! 3. From (p q) how to prove p? (next slide) 4. Having proved both p and q, prove some further contradiction Tutorial Exercise. p q p q 37 / 41

45 Not-or elimination (derived rule) (p q) p 1 (p q) 2 p 3 p q -I, 2 4 F E, 1, 3 5 p I, / 41

46 Proving a contrapositive rule In the same way, whenever you can prove any q then you can prove p p q 1 q 2 p 3 q your proof of q from p 4 F E, 1, 3 5 p I, / 41

47 Law of the excluded middle (derived) p p Everything must either be or not be. Russell 1 (p p) 2 p -E (previous slide), 1 3 p -E (previous slide), 1 4 F E, 2, 3 5 p p PC, / 41

48 Summary: Major Proof Techniques Three major styles of proof in logic and mathematics Model based computation: truth tables for propositional logic Algebraic proof: equational reasoning Deductive reasoning: rules of inference (e.g. Natural Deduction) Q. Why bother? Why not write a program that does truth tables? propositional logic is decidable: can write a program other logics are not: first order logic (next week) 41 / 41

Topic 1: Propositional logic

Topic 1: Propositional logic Guy McCusker 1 1 University of Bath Logic! This lecture is about the simplest kind of mathematical logic: propositional calculus. We discuss propositions, which are statements

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

Chapter 1: The Logic of Compound Statements January 7, 2008 Outline 1 1.1 Logical Form and Logical Equivalence 2 1.2 Conditional Statements 3 1.3 Valid and Invalid Arguments Central notion of deductive

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

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic Propositional logic Logical connectives Rules for wffs Truth tables for the connectives Using Truth Tables to evaluate

Logic. Propositional Logic: Syntax

Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about

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

Announcements CS311H: Discrete Mathematics Propositional Logic II Instructor: Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Wed 09/13 Remember: Due before

FORMAL PROOFS DONU ARAPURA

FORMAL PROOFS DONU ARAPURA This is a supplement for M385 on formal proofs in propositional logic. Rather than following the presentation of Rubin, I want to use a slightly different set of rules which

Propositional Equivalence

Propositional Equivalence Tautologies and contradictions A compound proposition that is always true, regardless of the truth values of the individual propositions involved, is called a tautology. Example:

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

P Formula Simplification, Essential Laws, Normal Forms Lila Kari University of Waterloo P Formula Simplification, Essential Laws, Normal CS245, Forms Logic and Computation 1 / 26 Propositional calculus

Computation and Logic Definitions

Computation and Logic Definitions True and False Also called Boolean truth values, True and False represent the two values or states an atom can assume. We can use any two distinct objects to represent

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

Proposition/Statement Boolean Logic CS 231 Dianna Xu A proposition is either true or false but not both he sky is blue Lisa is a Math major x == y Not propositions: Are you Bob? x := 7 1 2 Boolean variables

Section 1.1: Logical Form and Logical Equivalence

Section 1.1: Logical Form and Logical Equivalence An argument is a sequence of statements aimed at demonstrating the truth of an assertion. The assertion at the end of an argument is called the conclusion,

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

5 Logic In this part of the course we consider logic. Logic is used in many places in computer science including digital circuit design, relational databases, automata theory and computability, and artificial

Mathematical Logic Part One

Mathematical Logic Part One Question: How do we formalize the defnitions and reasoning we use in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical

CITS2211 Discrete Structures Proofs

CITS2211 Discrete Structures Proofs Unit coordinator: Rachel Cardell-Oliver August 13, 2017 Highlights 1 Arguments vs Proofs. 2 Proof strategies 3 Famous proofs Reading Chapter 1: What is a proof? Mathematics

Equivalence and Implication

Equivalence and Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February 7 8, 2018 Alice E. Fischer Laws of Logic... 1/33 1 Logical Equivalence Contradictions and Tautologies 2 3 4 Necessary

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Propositional Logic Jason Filippou CMSC250 @ UMCP 05-31-2016 ason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 1 / 38 Outline 1 Syntax 2 Semantics Truth Tables Simplifying expressions 3 Inference

HANDOUT AND SET THEORY. Ariyadi Wijaya

HANDOUT LOGIC AND SET THEORY Ariyadi Wijaya Mathematics Education Department Faculty of Mathematics and Natural Science Yogyakarta State University 2009 1 Mathematics Education Department Faculty of Mathematics

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof

Propositional Logic Not Enough

Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks

Natural deduction for truth-functional logic

Natural deduction for truth-functional logic Phil 160 - Boston University Why natural deduction? After all, we just found this nice method of truth-tables, which can be used to determine the validity or

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

The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Symbolic Logic 3 Testing deductive validity with truth tables For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true. So, given that truth tables

Propositional Logic Part 1

Propositional Logic Part 1 Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [Based on slides from Louis Oliphant, Andrew Moore, Jerry Zhu] slide 1 5 is even

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Section 1.2 Propositional Equivalences A tautology is a proposition which is always true. Classic Example: P P A contradiction is a proposition which is always false. Classic Example: P P A contingency

Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1

Doc112: Hardware Department of Computing, Imperial College London Doc112: Hardware Lecture 1 Slide 1 First Year Computer Hardware Course Lecturers Duncan Gillies Bjoern Schuller Doc112: Hardware Lecture

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9 Typeset September 23, 2005 1 Statements or propositions Defn: A statement is an assertion

Advanced Topics in LP and FP

Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

Mathematics for linguists

Mathematics for linguists WS 2009/2010 University of Tübingen January 7, 2010 Gerhard Jäger Mathematics for linguists p. 1 Inferences and truth trees Inferences (with a finite set of premises; from now

Propositional Logics and their Algebraic Equivalents

Propositional Logics and their Algebraic Equivalents Kyle Brooks April 18, 2012 Contents 1 Introduction 1 2 Formal Logic Systems 1 2.1 Consequence Relations......................... 2 3 Propositional Logic

DEDUCTION (I) TAUTOLOGIES, CONTRADICTIONS AND CONTINGENCIES & LOGICAL EQUIVALENCE AND LOGICAL CONSEQUENCE October 6, 2003 1 Tautologies, contradictions and contingencies Consider the truth table of the

First Order Logic: Syntax and Semantics

irst Order Logic: Syntax and Semantics COMP30412 Sean Bechhofer sean.bechhofer@manchester.ac.uk Logic Recap You should already know the basics of irst Order Logic (OL) It s a prerequisite of this course!

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Unit I LOGIC AND PROOFS B. Thilaka Applied Mathematics UNIT I LOGIC AND PROOFS Propositional Logic Propositional equivalences Predicates and Quantifiers Nested Quantifiers Rules of inference Introduction

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Discrete Mathematical Structures Chapter 1 he oundation: Logic 1 Lecture Overview 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Quantifiers l l l l l Statement Logical Connectives Conjunction

CHAPTER 10. Gentzen Style Proof Systems for Classical Logic

CHAPTER 10 Gentzen Style Proof Systems for Classical Logic Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. By humans, not mentioning

Propositions and Proofs

Propositions and Proofs Gert Smolka, Saarland University April 25, 2018 Proposition are logical statements whose truth or falsity can be established with proofs. Coq s type theory provides us with a language

COMP4418, 2017 Assignment 1

COMP4418, 2017 Assignment 1 Due: 14:59:59pm Wednesday 30 August (Week 6) Late penalty: 10 marks per day) Worth: 15%. This assignment consists of three questions. The first two questions require written

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

Logic: Truth Tables CS160 Rosen Chapter 1 Logic? 1 What is logic? Logic is a truth-preserving system of inference Truth-preserving: If the initial statements are true, the inferred statements will be true

Formal Logic. Critical Thinking

ormal Logic Critical hinking Recap: ormal Logic If I win the lottery, then I am poor. I win the lottery. Hence, I am poor. his argument has the following abstract structure or form: If P then Q. P. Hence,

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

COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural

Russell s logicism. Jeff Speaks. September 26, 2007

Russell s logicism Jeff Speaks September 26, 2007 1 Russell s definition of number............................ 2 2 The idea of reducing one theory to another.................... 4 2.1 Axioms and theories.............................

3 The Semantics of the Propositional Calculus

3 The Semantics of the Propositional Calculus 1. Interpretations Formulas of the propositional calculus express statement forms. In chapter two, we gave informal descriptions of the meanings of the logical

Classical Propositional Logic

The Language of A Henkin-style Proof for Natural Deduction January 16, 2013 The Language of A Henkin-style Proof for Natural Deduction Logic Logic is the science of inference. Given a body of information,

Definition 2. Conjunction of p and q

Proposition Propositional Logic CPSC 2070 Discrete Structures Rosen (6 th Ed.) 1.1, 1.2 A proposition is a statement that is either true or false, but not both. Clemson will defeat Georgia in football

Logic Part I: Classical Logic and Its Semantics

Logic Part I: Classical Logic and Its Semantics Max Schäfer Formosan Summer School on Logic, Language, and Computation 2007 July 2, 2007 1 / 51 Principles of Classical Logic classical logic seeks to model

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

Propositional Logic Reading: Chapter 7.1, 7.3 7.5 [ased on slides from Jerry Zhu, Louis Oliphant and ndrew Moore] Logic If the rules of the world are presented formally, then a decision maker can use logical

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

Logic and Discrete Mathematics Section 3.5 Propositional logical equivalence Negation of propositional formulae Slides version: January 2015 Logical equivalence of propositional formulae Propositional

AI Programming CS S-09 Knowledge Representation

AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering

MAT 243 Test 1 SOLUTIONS, FORM A

t MAT 243 Test 1 SOLUTIONS, FORM A 1. [10 points] Rewrite the statement below in positive form (i.e., so that all negation symbols immediately precede a predicate). ( x IR)( y IR)((T (x, y) Q(x, y)) R(x,

Semantics and Pragmatics of NLP

Semantics and Pragmatics of NLP Alex Ewan School of Informatics University of Edinburgh 28 January 2008 1 2 3 Taking Stock We have: Introduced syntax and semantics for FOL plus lambdas. Represented FOL

INTRODUCTION TO LOGIC

INTRODUCTION TO LOGIC 6 Natural Deduction Volker Halbach There s nothing you can t prove if your outlook is only sufficiently limited. Dorothy L. Sayers http://www.philosophy.ox.ac.uk/lectures/ undergraduate_questionnaire

Lecture 7. Logic. Section1: Statement Logic.

Ling 726: Mathematical Linguistics, Logic, Section : Statement Logic V. Borschev and B. Partee, October 5, 26 p. Lecture 7. Logic. Section: Statement Logic.. Statement Logic..... Goals..... Syntax of Statement

Mathematical Preliminaries. Sipser pages 1-28

Mathematical Preliminaries Sipser pages 1-28 Mathematical Preliminaries This course is about the fundamental capabilities and limitations of computers. It has 3 parts 1. Automata Models of computation

Introduction to Artificial Intelligence. Logical Agents

Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based

CMPSCI 601: Tarski s Truth Definition Lecture 15. where

@ CMPSCI 601: Tarski s Truth Definition Lecture 15! "\$#&%(') *+,-!".#/%0'!12 43 5 6 7 8:9 4; 9 9 < = 9 = or 5 6?>A@B!9 2 D for all C @B 9 CFE where ) CGE @B-HI LJKK MKK )HG if H ; C if H @ 1 > > > Fitch

Propositional and Predicate Logic

Propositional and Predicate Logic CS 536-05: Science of Programming This is for Section 5 Only: See Prof. Ren for Sections 1 4 A. Why Reviewing/overviewing logic is necessary because we ll be using it

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Logical Operators Conjunction Disjunction Negation Exclusive Or Implication Biconditional 1 Statement meaning p q p implies q if p, then q if p, q when p, q whenever p, q q if p q when p q whenever p p

Propositional Logic Language

Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

Propositional Logic. Fall () Propositional Logic Fall / 30

Propositional Logic Fall 2013 () Propositional Logic Fall 2013 1 / 30 1 Introduction Learning Outcomes for this Presentation 2 Definitions Statements Logical connectives Interpretations, contexts,... Logically

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

x NOT ~x x y AND x /\ y x y OR x \/ y Figure 1: Types of gates in a digital circuit. CS2742 midterm test 2 study sheet Boolean circuits: Boolean circuits is a generalization of Boolean formulas in which

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

March 5, 2012 Webwork Homework. The handout on Logic is Chapter 4 from Mary Attenborough s book Mathematics for Electrical Engineering and Computing. Proving Propositions We combine basic propositions

The Logic of Compound Statements cont.

The Logic of Compound Statements cont. CSE 215, Computer Science 1, Fall 2011 Stony Brook University http://www.cs.stonybrook.edu/~cse215 Refresh from last time: Logical Equivalences Commutativity of :

Logic of Sentences (Propositional Logic) is interested only in true or false statements; does not go inside.

You are a mathematician if 1.1 Overview you say to a car dealer, I ll take the red car or the blue one, but then you feel the need to add, but not both. --- 1. Logic and Mathematical Notation (not in the

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

Introduction INTRODUCTION TO LOGIC 2 Syntax and Semantics of Propositional Logic Volker Halbach In what follows I look at some formal languages that are much simpler than English and define validity of

A Little Deductive Logic

A Little Deductive Logic In propositional or sentential deductive logic, we begin by specifying that we will use capital letters (like A, B, C, D, and so on) to stand in for sentences, and we assume that

Logical Agents. Outline

Logical Agents *(Chapter 7 (Russel & Norvig, 2004)) Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

Propositional Logic Logical Implication (4A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation

Glossary of Logical Terms

Math 304 Spring 2007 Glossary of Logical Terms The following glossary briefly describes some of the major technical logical terms used in this course. The glossary should be read through at the beginning

Chapter 2: Introduction to Propositional Logic

Chapter 2: Introduction to Propositional Logic PART ONE: History and Motivation Origins: Stoic school of philosophy (3rd century B.C.), with the most eminent representative was Chryssipus. Modern Origins:

Boolean Algebra. Philipp Koehn. 9 September 2016

Boolean Algebra Philipp Koehn 9 September 2016 Core Boolean Operators 1 AND OR NOT A B A and B 0 0 0 0 1 0 1 0 0 1 1 1 A B A or B 0 0 0 0 1 1 1 0 1 1 1 1 A not A 0 1 1 0 AND OR NOT 2 Boolean algebra Boolean

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Contents Mathematical Reasoning 3.1 Mathematical Models........................... 3. Mathematical Proof............................ 4..1 Structure of Proofs........................ 4.. Direct Method..........................

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

Propositional Logic CS 3234: Logic and Formal Systems Martin Henz and Aquinas Hobor August 26, 2010 Generated on Tuesday 31 August, 2010, 16:54 1 Motivation In traditional logic, terms represent sets,

Tutorial on Axiomatic Set Theory. Javier R. Movellan

Tutorial on Axiomatic Set Theory Javier R. Movellan Intuitively we think of sets as collections of elements. The crucial part of this intuitive concept is that we are willing to treat sets as entities

Axiomatic systems. Revisiting the rules of inference. Example: A theorem and its proof in an abstract axiomatic system:

Axiomatic systems Revisiting the rules of inference Material for this section references College Geometry: A Discovery Approach, 2/e, David C. Kay, Addison Wesley, 2001. In particular, see section 2.1,

MA103 STATEMENTS, PROOF, LOGIC

MA103 STATEMENTS, PROOF, LOGIC Abstract Mathematics is about making precise mathematical statements and establishing, by proof or disproof, whether these statements are true or false. We start by looking

02 Propositional Logic

SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

Propositional Logic Review

Propositional Logic Review UC Berkeley, Philosophy 142, Spring 2016 John MacFarlane The task of describing a logical system comes in three parts: Grammar Describing what counts as a formula Semantics Defining

Mathematical Logic Part One

Mathematical Logic Part One Question: How do we formalize the definitions and reasoning we use in our proofs? Where We're Going Propositional Logic (Today) Basic logical connectives. Truth tables. Logical

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

The Laws of Boolean Boolean algebra As well as the logic symbols 0 and 1 being used to represent a digital input or output, we can also use them as constants for a permanently Open or Closed circuit or

Notes on Inference and Deduction

Notes on Inference and Deduction Consider the following argument 1 Assumptions: If the races are fixed or the gambling houses are crooked, then the tourist trade will decline. If the tourist trade declines

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

CS100: DISCREE SRUCURES Lecture 5: Logic (Ch1) Lecture Overview 2 Statement Logical Connectives Conjunction Disjunction Propositions Conditional Bio-conditional Converse Inverse Contrapositive Laws of

Artificial Intelligence

Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Outline Knowledge-based agents Wumpus world Logic in general

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

Intelligent Agents First Order Logic Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University last change: 19. Mai 2015 U. Schmid (CogSys) Intelligent Agents last change: 19. Mai 2015

Introduction to Metalogic

Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

CHAPTER 6 - THINKING ABOUT AND PRACTICING PROPOSITIONAL LOGIC

1 CHAPTER 6 - THINKING ABOUT AND PRACTICING PROPOSITIONAL LOGIC Here, you ll learn: what it means for a logic system to be finished some strategies for constructing proofs Congratulations! Our system of

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Chapter 3 Cartesian Products and Relations The material in this chapter is the first real encounter with abstraction. Relations are very general thing they are a special type of subset. After introducing

ECOM Discrete Mathematics

ECOM 2311- Discrete Mathematics Chapter # 1 : The Foundations: Logic and Proofs Fall, 2013/2014 ECOM 2311- Discrete Mathematics - Ch.1 Dr. Musbah Shaat 1 / 85 Outline 1 Propositional Logic 2 Propositional

Linear Temporal Logic (LTL)

Chapter 9 Linear Temporal Logic (LTL) This chapter introduces the Linear Temporal Logic (LTL) to reason about state properties of Labelled Transition Systems defined in the previous chapter. We will first

A. Propositional Logic

CmSc 175 Discrete Mathematics A. Propositional Logic 1. Statements (Propositions ): Statements are sentences that claim certain things. Can be either true or false, but not both. Propositional logic deals

Kecerdasan Buatan M. Ali Fauzi

Kecerdasan Buatan M. Ali Fauzi Artificial Intelligence M. Ali Fauzi Logical Agents M. Ali Fauzi In which we design agents that can form representations of the would, use a process of inference to derive

Logic and Proofs. Jan COT3100: Applications of Discrete Structures Jan 2007

COT3100: Propositional Equivalences 1 Logic and Proofs Jan 2007 COT3100: Propositional Equivalences 2 1 Translating from Natural Languages EXAMPLE. Translate the following sentence into a logical expression:

Equivalents of Mingle and Positive Paradox

Eric Schechter Equivalents of Mingle and Positive Paradox Abstract. Relevant logic is a proper subset of classical logic. It does not include among itstheoremsanyof positive paradox A (B A) mingle A (A

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173

Propositional Logic CSC 17 Propositional logic mathematical model (or algebra) for reasoning about the truth of logical expressions (propositions) Logical expressions propositional variables or logical

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4 Neil D. Jones DIKU 2005 Some slides today new, some based on logic 2004 (Nils Andersen), some based on kernebegreber (NJ 2005) PREDICATE LOGIC:

Artificial Intelligence

Artificial Intelligence Propositional Logic Marc Toussaint University of Stuttgart Winter 2016/17 (slides based on Stuart Russell s AI course) Motivation: Most students will have learnt about propositional

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS 1 Language There are several propositional languages that are routinely called classical propositional logic languages. It is due to the functional dependency

Supplementary exercises in propositional logic

Supplementary exercises in propositional logic The purpose of these exercises is to train your ability to manipulate and analyze logical formulas. Familiarize yourself with chapter 7.3-7.5 in the course

Deductive Systems. Lecture - 3

Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth