Logic As Algebra COMP1600 / COMP6260. Dirk Pattinson Australian National University. Semester 2, 2017
|
|
- Camron Hodge
- 6 years ago
- Views:
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
Propositional natural deduction
Propositional natural deduction COMP2600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2016 Major proof techniques 1 / 25 Three major styles of proof in logic and mathematics Model
More informationCOMP 2600: Formal Methods for Software Engineeing
COMP 2600: Formal Methods for Software Engineeing Dirk Pattinson Semester 2, 2013 What do we mean by FORMAL? Oxford Dictionary in accordance with convention or etiquette or denoting a style of writing
More informationTopic 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
More informationLogic: Propositional Logic (Part I)
Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.
More informationChapter 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
More informationn logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)
Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.6) TOPICS Propositional Logic Logical Operators Truth Tables Implication Logical Equivalence Inference Rules What you should know about propositional
More informationDescription Logics. Foundations of Propositional Logic. franconi. Enrico Franconi
(1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge
More informationCSC Discrete Math I, Spring Propositional Logic
CSC 125 - Discrete Math I, Spring 2017 Propositional Logic Propositions A proposition is a declarative sentence that is either true or false Propositional Variables A propositional variable (p, q, r, s,...)
More informationSection 1.2: Propositional Logic
Section 1.2: Propositional Logic January 17, 2017 Abstract Now we re going to use the tools of formal logic to reach logical conclusions ( prove theorems ) based on wffs formed by some given statements.
More information1.3 Propositional Equivalences
1 1.3 Propositional Equivalences The replacement of a statement with another statement with the same truth is an important step often used in Mathematical arguments. Due to this methods that produce propositions
More informationProof strategies, or, a manual of logical style
Proof strategies, or, a manual of logical style Dr Holmes September 27, 2017 This is yet another version of the manual of logical style I have been working on for many years This semester, instead of posting
More informationAI 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
More information2. The Logic of Compound Statements Summary. Aaron Tan August 2017
2. The Logic of Compound Statements Summary Aaron Tan 21 25 August 2017 1 2. The Logic of Compound Statements 2.1 Logical Form and Logical Equivalence Statements; Compound Statements; Statement Form (Propositional
More informationPart Two: The Basic Components of the SOFL Specification Language
Part Two: The Basic Components of the SOFL Specification Language SOFL logic Module Condition Data Flow Diagrams Process specification Function definition and specification Process decomposition Other
More informationComputation 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
More informationLogic. 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
More informationNatural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson
Natural Deduction Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. An example 1. Validity by truth table 2. Validity by proof 2. What s a proof 1. Proof checker 3. Rules of
More informationCSE 20: Discrete Mathematics
Spring 2018 Summary Last time: Today: Logical connectives: not, and, or, implies Using Turth Tables to define logical connectives Logical equivalences, tautologies Some applications Proofs in propositional
More informationSupplementary Logic Notes CSE 321 Winter 2009
1 Propositional Logic Supplementary Logic Notes CSE 321 Winter 2009 1.1 More efficient truth table methods The method of using truth tables to prove facts about propositional formulas can be a very tedious
More informationFORMAL 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
More information2.2: Logical Equivalence: The Laws of Logic
Example (2.7) For primitive statement p and q, construct a truth table for each of the following compound statements. a) p q b) p q Here we see that the corresponding truth tables for two statement p q
More informationPropositional 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:
More informationAnnouncements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example
Announcements CS243: Discrete Structures Propositional Logic II Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Tuesday 09/11 Weilin s Tuesday office hours are
More informationReview CHAPTER. 2.1 Definitions in Chapter Sample Exam Questions. 2.1 Set; Element; Member; Universal Set Partition. 2.
CHAPTER 2 Review 2.1 Definitions in Chapter 2 2.1 Set; Element; Member; Universal Set 2.2 Subset 2.3 Proper Subset 2.4 The Empty Set, 2.5 Set Equality 2.6 Cardinality; Infinite Set 2.7 Complement 2.8 Intersection
More informationAnnouncements. 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
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics Statistics York University Sept 18, 2014 Outline 1 2 Tautologies Definition A tautology is a compound proposition
More informationCompound Propositions
Discrete Structures Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not 2. And 3. Or 4. Exclusive or 5. Implication 6. Biconditional Truth
More informationLecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)
Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or
More information1 Propositional Logic
1 Propositional Logic Required reading: Foundations of Computation. Sections 1.1 and 1.2. 1. Introduction to Logic a. Logical consequences. If you know all humans are mortal, and you know that you are
More informationDepartment of Computer Science & Software Engineering Comp232 Mathematics for Computer Science
Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science Fall 2018 Assignment 1. Solutions 1. For each of the following statements use a truth table to determine whether
More informationPropositional 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
More informationSample Problems for all sections of CMSC250, Midterm 1 Fall 2014
Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014 1. Translate each of the following English sentences into formal statements using the logical operators (,,,,, and ). You may also use mathematical
More informationLearning Goals of CS245 Logic and Computation
Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction
More informationEECS 1028 M: Discrete Mathematics for Engineers
EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 26 Why Study Logic?
More informationChapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.
Chapter 1 Chapter Summary Propositional Logic The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.3) Predicate Logic The Language of Quantifiers (1.4) Logical Equivalences (1.4)
More informationManual of Logical Style (fresh version 2018)
Manual of Logical Style (fresh version 2018) Randall Holmes 9/5/2018 1 Introduction This is a fresh version of a document I have been working on with my classes at various levels for years. The idea that
More informationMathematical 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 (oday) Basic logical connectives. ruth tables. Logical
More informationTruth-Functional Logic
Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence
More informationPropositional Logic. Spring Propositional Logic Spring / 32
Propositional Logic Spring 2016 Propositional Logic Spring 2016 1 / 32 Introduction Learning Outcomes for this Presentation Learning Outcomes... At the conclusion of this session, we will Define the elements
More informationExamples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:
Logic: The Big Picture Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and
More informationSection 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,
More informationLogic for Computer Science - Week 4 Natural Deduction
Logic for Computer Science - Week 4 Natural Deduction 1 Introduction In the previous lecture we have discussed some important notions about the semantics of propositional logic. 1. the truth value of a
More informationLogic. Propositional Logic: Syntax. Wffs
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
More informationWarm-Up Problem. Is the following true or false? 1/35
Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,
More informationProving Things. Why prove things? Proof by Substitution, within Logic. Rules of Inference: applying Logic. Using Assumptions.
1 Proving Things Why prove things? Proof by Substitution, within Logic Rules of Inference: applying Logic Using Assumptions Proof Strategies 2 Why Proofs? Knowledge is power. Where do we get it? direct
More informationMathematical 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
More informationPropositional 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
More informationLogic for Computer Science - Week 5 Natural Deduction
Logic for Computer Science - Week 5 Natural Deduction Ștefan Ciobâcă November 30, 2017 1 An Alternative View of Implication and Double Implication So far, we have understood as a shorthand of However,
More informationCITS2211 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
More informationBoolean Logic. CS 231 Dianna Xu
Boolean Logic CS 231 Dianna Xu 1 Proposition/Statement A proposition is either true or false but not both The sky is blue Lisa is a Math major x == y Not propositions: Are you Bob? x := 7 2 Boolean variables
More informationThe 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
More informationTools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:
Tools for reasoning: Logic Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications: 1 Why study propositional logic? A formal mathematical language for precise
More informationn Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B
Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.7, 5.5) TOPICS Sets and Functions Propositional and Predicate Logic Logical Operators and Truth Tables Logical Equivalences and Inference
More informationPropositional 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
More informationProposition/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
More informationCM10196 Topic 2: Sets, Predicates, Boolean algebras
CM10196 Topic 2: Sets, Predicates, oolean algebras Guy McCusker 1W2.1 Sets Most of the things mathematicians talk about are built out of sets. The idea of a set is a simple one: a set is just a collection
More informationCOMP219: 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
More informationNotes on Propositional and First-Order Logic (CPSC 229 Class Notes, January )
Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January 23 30 2017) John Lasseter Revised February 14, 2017 The following notes are a record of the class sessions we ve devoted to the
More informationLogic - recap. So far, we have seen that: Logic is a language which can be used to describe:
Logic - recap So far, we have seen that: Logic is a language which can be used to describe: Statements about the real world The simplest pieces of data in an automatic processing system such as a computer
More informationChapter 1, Part I: Propositional Logic. With Question/Answer Animations
Chapter 1, Part I: Propositional Logic With Question/Answer Animations Chapter Summary Propositional Logic The Language of Propositions Applications Logical Equivalences Predicate Logic The Language of
More informationLanguage of Propositional Logic
Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called
More informationDiscrete Mathematics and Applications COT3100
Discrete Mathematics and Applications CO3100 Dr. Ungor Sources: Slides are based on Dr. G. Bebis material. uesday, January 7, 2014 oundations of Logic: Overview Propositional logic: (Sections 1.1-1.3)
More informationPropositional Logic: Syntax
Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic
More informationA 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
More information2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic
CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares
More informationEquivalence 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
More informationCHAPTER 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
More informationPropositions and Proofs
Chapter 2 Propositions and Proofs The goal of this chapter is to develop the two principal notions of logic, namely propositions and proofs There is no universal agreement about the proper foundations
More informationThe Foundations: Logic and Proofs. Part I
The Foundations: Logic and Proofs Part I Chapter Summary Propositional Logic n The Language of Propositions n Applications n Logical Equivalences Predicate Logic n The Language of Quantifiers n Logical
More informationCOMP219: 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
More informationHANDOUT 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
More informationSymbolic 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
More informationHoare Logic: Reasoning About Imperative Programs
Hoare Logic: Reasoning About Imperative Programs COMP1600 / COMP6260 Dirk Pattinson Australian National University Semester 2, 2018 Programming Paradigms Functional. (Haskell, SML, OCaml,... ) main paradigm:
More informationPropositional logic ( ): Review from Mat 1348
CSI 2101 / Winter 2008: Discrete Structures. Propositional logic ( 1.1-1.2): Review from Mat 1348 Dr. Nejib Zaguia - Winter 2008 1 Propositional logic: Review Mathematical Logic is a tool for working with
More informationThe semantics of propositional logic
The semantics of propositional logic Readings: Sections 1.3 and 1.4 of Huth and Ryan. In this module, we will nail down the formal definition of a logical formula, and describe the semantics of propositional
More informationCISC-102 Winter 2016 Lecture 17
CISC-102 Winter 2016 Lecture 17 Logic and Propositional Calculus Propositional logic was eventually refined using symbolic logic. The 17th/18th century philosopher Gottfried Leibniz (an inventor of calculus)
More informationINF3170 Logikk Spring Homework #8 For Friday, March 18
INF3170 Logikk Spring 2011 Homework #8 For Friday, March 18 Problems 2 6 have to do with a more explicit proof of the restricted version of the completeness theorem: if = ϕ, then ϕ. Note that, other than
More informationPropositional 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
More informationChapter 4, Logic using Propositional Calculus Handout
ECS 20 Chapter 4, Logic using Propositional Calculus Handout 0. Introduction to Discrete Mathematics. 0.1. Discrete = Individually separate and distinct as opposed to continuous and capable of infinitesimal
More informationPart 1: Propositional Logic
Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax
More informationTautologies, Contradictions, and Contingencies
Section 1.3 Tautologies, Contradictions, and Contingencies A tautology is a proposition which is always true. Example: p p A contradiction is a proposition which is always false. Example: p p A contingency
More informationUnit 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
More informationPHIL12A Section answers, 28 Feb 2011
PHIL12A Section answers, 28 Feb 2011 Julian Jonker 1 How much do you know? Give formal proofs for the following arguments. 1. (Ex 6.18) 1 A B 2 A B 1 A B 2 A 3 A B Elim: 2 4 B 5 B 6 Intro: 4,5 7 B Intro:
More informationMath 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1
Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1 In its most basic form, a mathematical proof is just a sequence of mathematical statements, connected to each other by strict
More information3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations
Logic Propositions and logical operations Main concepts: propositions truth values propositional variables logical operations 1 Propositions and logical operations A proposition is the most basic element
More informationChapter 11: Automated Proof Systems
Chapter 11: Automated Proof Systems SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems are
More informationLogic and Proofs. (A brief summary)
Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations
More informationTHE LOGIC OF COMPOUND STATEMENTS
CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 2.1 Logical Form and Logical Equivalence Copyright Cengage Learning. All rights reserved. Logical Form
More information(p == train arrives late) (q == there are taxis) (r == If p and not q, then r. Not r. p. Therefore, q. Propositional Logic
Propositional Logic The aim of logic in computer science is to develop languages to model the situations we encounter as computer science professionals Want to do that in such a way that we can reason
More informationNatural 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
More informationOverview. I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof.
Overview I Review of natural deduction. I Soundness and completeness. I Semantics of propositional formulas. I Soundness proof. I Completeness proof. Propositional formulas Grammar: ::= p j (:) j ( ^ )
More informationCOMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University
COMP 182 Algorithmic Thinking Proofs Luay Nakhleh Computer Science Rice University 1 Reading Material Chapter 1, Section 3, 6, 7, 8 Propositional Equivalences The compound propositions p and q are called
More information1 IPL and Heyting Prelattices
CHAPTER 11: FULL PROPOSITIONAL LOGICS 1 IPL and Heyting Prelattices By full PLs, we mean ones with the complete inventory of standard connectives: those of PIPL (,, T), as well as, F, and. In this section
More informationDiscrete Structures of Computer Science Propositional Logic III Rules of Inference
Discrete Structures of Computer Science Propositional Logic III Rules of Inference Gazihan Alankuş (Based on original slides by Brahim Hnich) July 30, 2012 1 Previous Lecture 2 Summary of Laws of Logic
More informationNatural Deduction for Propositional Logic
Natural Deduction for Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 10, 2018 Bow-Yaw Wang (Academia Sinica) Natural Deduction for Propositional Logic
More information7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring
109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment
More informationWe last time we began introducing equivalency laws.
Monday, January 14 MAD2104 Discrete Math 1 Course website: www/mathfsuedu/~wooland/mad2104 Today we will continue in Course Notes Chapter 22 We last time we began introducing equivalency laws Today we
More informationCOMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning
COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal
More informationLECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel
LECTURE NOTES on DISCRETE MATHEMATICS Eusebius Doedel 1 LOGIC Introduction. First we introduce some basic concepts needed in our discussion of logic. These will be covered in more detail later. A set is
More information7. Propositional Logic. Wolfram Burgard and Bernhard Nebel
Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics
More information