CSE 311: Foundations of Computing. Lecture 6: More Predicate Logic
|
|
- Janel Harris
- 5 years ago
- Views:
Transcription
1 CSE 311: Foundations of Computing Lecture 6: More Predicate Logic
2 Last class: Predicates Predicate A function that returns a truth value, e.g., Cat(x) ::= x is a cat Prime(x) ::= x is prime HasTaken(x, y) ::= student x has taken course y LessThan(x, y) ::= x < y Sum(x, y, z) ::= x + y = z GreaterThan5(x) ::= x > 5 HasNChars(s, n) ::= string s has length n Predicates can have varying numbers of arguments and input types.
3 Last class: Domain of Discourse For ease of use, we define one type / domain that we work over. This set of objects is called the domain of discourse. For each of the following, what might the domain be? (1) x is a cat, x barks, x ruined my couch (2) x is prime, x = 0, x < 0, x is a power of two (3) x is a pre-req for z
4 Domain of Discourse For ease of use, we define one type / domain that we work over. This set of objects is called the domain of discourse. For each of the following, what might the domain be? (1) x is a cat, x barks, x ruined my couch mammals or sentient beings or cats and dogs or (2) x is prime, x = 0, x < 0, x is a power of two numbers or integers or integers greater than 5 or (3) x is a pre-req for z courses
5 Last Class: Quantifiers We use quantifiers to talk about collections of objects. x P(x) P(x) is true for every x in the domain read as for all x, P of x x P(x) There is an x in the domain for which P(x) is true read as there exists x, P of x
6 Last class: Statements with Quantifiers Domain of Discourse Positive Integers Predicate Definitions Even(x) ::= x is even Odd(x) ::= x is odd Prime(x) ::= x is prime Determine the truth values of each of these statements: x Even(x) x Odd(x) x (Even(x) Odd(x)) x (Even(x) Odd(x)) x Greater(x+1, x) x (Even(x) Prime(x)) Greater(x, y) ::= x > y Equal(x, y) ::= x = y Sum(x, y, z) ::= x + y = z
7 Statements with Quantifiers Domain of Discourse Positive Integers Predicate Definitions Even(x) ::= x is even Odd(x) ::= x is odd Prime(x) ::= x is prime Determine the truth values of each of these statements: Greater(x, y) ::= x > y Equal(x, y) ::= x = y Sum(x, y, z) ::= x + y = z x Even(x) x Odd(x) x (Even(x) Odd(x)) x (Even(x) Odd(x)) x Greater(x+1, x) x (Even(x) Prime(x)) T e.g. 2, 4, 6,... F e.g. 2, 4, 6,... T every integer is either even or odd F no integer is both even and odd T adding 1 makes a bigger number T Even(2) is true and Prime(2) is true
8 Statements with Quantifiers Domain of Discourse Positive Integers Predicate Definitions Even(x) ::= x is even Odd(x) ::= x is odd Prime(x) ::= x is prime Translate the following statements to English Greater(x, y) ::= x > y Equal(x, y) ::= x = y Sum(x, y, z) ::= x + y = z x y Greater(y, x) x y Greater(x, y) x y (Greater(y, x) Prime(y)) x (Prime(x) (Equal(x, 2) Odd(x))) x y (Sum(x, 2, y) Prime(x) Prime(y))
9 Statements with Quantifiers (Literal Translations) Domain of Discourse Positive Integers Predicate Definitions Even(x) ::= x is even Odd(x) ::= x is odd Prime(x) ::= x is prime Translate the following statements to English Greater(x, y) ::= x > y Equal(x, y) ::= x = y Sum(x, y, z) ::= x + y = z x y Greater(y, x) For every positive integer x, there is a positive integer y, such that y > x. x y Greater(x, y) For every positive integer x, there is a positive integer y, such that x > y. x y (Greater(y, x) Prime(y)) For every positive integer x, there is a pos. int. y such that y > x and y is prime. x (Prime(x) (Equal(x, 2) Odd(x))) For each positive integer x, if x is prime, then x = 2 or x is odd. x y (Sum(x, 2, y) Prime(x) Prime(y)) There exist positive integers x and y such that x + 2 = y and x and y are prime.
10 Statements with Quantifiers (Natural Translations) Domain of Discourse Positive Integers Predicate Definitions Even(x) ::= x is even Odd(x) ::= x is odd Prime(x) ::= x is prime Translate the following statements to English Greater(x, y) ::= x > y Equal(x, y) ::= x = y Sum(x, y, z) ::= x + y = z x y Greater(y, x) There is no greatest integer. x y Greater(x, y) There is no least integer. x y (Greater(y, x) Prime(y)) For every positive integer there is a larger number that is prime. x (Prime(x) (Equal(x, 2) Odd(x))) Every prime number is either 2 or odd. x y (Sum(x, 2, y) Prime(x) Prime(y)) There exist prime numbers that differ by two.
11 English to Predicate Logic Domain of Discourse Mammals Predicate Definitions Cat(x) ::= x is a cat Red(x) ::= x is red LikesTofu(x) ::= x likes tofu Red cats like tofu Some red cats don t like tofu
12 English to Predicate Logic Domain of Discourse Mammals Predicate Definitions Cat(x) ::= x is a cat Red(x) ::= x is red LikesTofu(x) ::= x likes tofu Red cats like tofu x ((Red(x) Cat(x)) LikesTofu(x)) Some red cats don t like tofu y ((Red(y) Cat(y)) LikesTofu(y))
13 English to Predicate Logic Domain of Discourse Mammals Red cats like tofu When there s no leading quantification, it means for all. Some red cats don t like tofu Predicate Definitions Cat(x) ::= x is a cat Red(x) ::= x is red LikesTofu(x) ::= x likes tofu When putting two predicates together like this, we use an and. When restricting to a smaller domain in a for all we use implication. When restricting to a smaller domain in an exists we use and. Some means there exists.
14 Negations of Quantifiers Predicate Definitions PurpleFruit(x) ::= x is a purple fruit (*) x PurpleFruit(x) ( All fruits are purple ) What is the negation of (*)? (a) there exists a purple fruit (b) there exists a non-purple fruit (c) all fruits are not purple Try your intuition! Which one feels right? Key Idea: In every domain, exactly one of a statement and its negation should be true.
15 Negations of Quantifiers Predicate Definitions PurpleFruit(x) ::= x is a purple fruit (*) x PurpleFruit(x) ( All fruits are purple ) What is the negation of (*)? (a) there exists a purple fruit (b) there exists a non-purple fruit (c) all fruits are not purple Key Idea: In every domain, exactly one of a statement and its negation should be true. Domain of Discourse {plum} Domain of Discourse {apple} Domain of Discourse {plum, apple} (*), (a) (b), (c) (a), (b)
16 Negations of Quantifiers Predicate Definitions PurpleFruit(x) ::= x is a purple fruit (*) x PurpleFruit(x) ( All fruits are purple ) What is the negation of (*)? (a) there exists a purple fruit (b) there exists a non-purple fruit (c) all fruits are not purple Key Idea: In every domain, exactly one of a statement and its negation should be true. Domain of Discourse {plum} Domain of Discourse {apple} Domain of Discourse {plum, apple} (*), (a) (b), (c) (a), (b) The only choice that ensures exactly one of the statement and its negation is (b).
17 De Morgan s Laws for Quantifiers x P(x) x P(x) x P(x) x P(x)
18 De Morgan s Laws for Quantifiers x P(x) x P(x) x P(x) x P(x) There is no largest integer x y ( x y) x y ( x y) x y ( x y) x y (y > x) For every integer there is a larger integer
19 Scope of Quantifiers x (P(x) Q(x)) vs. x P(x) x Q(x)
20 scope of quantifiers x (P(x) Q(x)) vs. xp(x) xq(x) This one asserts P and Q of the same x. This one asserts P and Q of potentially different x s.
21 Scope of Quantifiers Example: NotLargest(x) y Greater (y, x) z Greater (z, x) truth value: doesn t depend on y or z bound variables does depend on x free variable quantifiers only act on free variables of the formula they quantify x( y(p(x,y) xq(y, x)))
22 Quantifier Style x( y(p(x,y) xq(y, x))) This isn t wrong, it s just horrible style. Don t confuse your reader by using the same variable multiple times there are a lot of letters
23 Nested Quantifiers Bound variable names don t matter x y P(x, y) a b P(a, b) Positions of quantifiers can sometimes change x (Q(x) yp(x, y)) x y(q(x) P(x, y)) But: order is important...
24 Quantifier Order Can Matter Domain of Discourse Integers OR {1, 2, 3, 4} Predicate Definitions GreaterEq(x, y) ::= x y There is a number greater than or equal to all numbers. x y GreaterEq(x, y))) Every number has a number greater than or equal to it. y x GreaterEq(x, y))) x y T F F F T T F F T T T F T T T T The purple statement requires an entire row to be true. The red statement requires one entry in each column to be true.
25 Quantification with Two Variables expression when true when false x y P(x, y) Every pair is true. At least one pair is false. x y P(x, y) At least one pair is true. All pairs are false. x y P(x, y) Wecan find a specific y for each x. (x 1, y 1 ), (x 2, y 2 ), (x 3, y 3 ) y x P(x, y) Wecan find ONE y that works no matter what x is. (x 1, y), (x 2, y), (x 3, y) Some x doesn t have a corresponding y. For any candidate y, there is an x that it doesn t work for.
26 Logical Inference So far we ve considered: How to understand and express things using propositional and predicate logic How to compute using Boolean (propositional) logic How to show that different ways of expressing or computing them are equivalent to each other Logic also has methods that let us infer implied properties from ones that we know Equivalence is a small part of this
27 Applications of Logical Inference Software Engineering Express desired properties of program as set of logical constraints Use inference rules to show that program implies that those constraints are satisfied Artificial Intelligence Automated reasoning Algorithm design and analysis e.g., Correctness, Loop invariants. Logic Programming, e.g. Prolog Express desired outcome as set of constraints Automatically apply logic inference to derive solution
28 Proofs Start with hypotheses and facts Use rules of inference to extend set of facts Result is proved when it is included in the set
29 An inference rule: Modus Ponens If p and p q are both true then q must be true Write this rule as p, p q q Given: If it is Monday then you have a 311 class today. It is Monday. Therefore, by Modus Ponens: You have a 311 class today.
30 My First Proof! Show that r follows from p, p q, and q r 1. p Given 2. p q Given 3. q r Given 4. 5.
31 My First Proof! Show that r follows from p, p q, and q r 1. p Given 2. p q Given 3. q r Given 4. q MP: 1, 2 5. r MP: 3, 4
32 Proofs can use equivalences too Show that p follows from p q and q 1. p q Given 2. q Given 3. q p Contrapositive: 1 4. p MP: 2, 3
33 Inference Rules Each inference rule is written as:...which means that if both A and B are true then you can infer C and you can infer D. For rule to be correct (A B) C and (A B) D must be a tautologies A, B C,D Sometimes rules don t need anything to start with. These rules are called axioms: e.g. Excluded Middle Axiom p p
34 Simple Propositional Inference Rules Excluded middle plus two inference rules per binary connective, one to eliminate it and one to introduce it p q p, q p q, p q p, p q q p, q p q p x p q, q p p q p q Direct Proof Rule Not like other rules
35 Proofs Show that r follows from p, p q and (p q) r How To Start: We have givens, find the ones that go together and use them. Now, treat new things as givens, and repeat. p, p q q p q p, q p, q p q
36 Proofs Show that follows from,, and Two visuals of the same proof. We will use the top one, but if the bottom one helps you think about it, that s great! MP Intro MP 1. Given 2. Given 3. MP: 1, 2 4. Intro : 1, 3 5. Given 6. MP: 4, 5
37 Important: Applications of Inference Rules You can use equivalences to make substitutions of any sub-formula. Inference rules only can be applied to whole formulas (not correct otherwise). e.g. 1. p q given 2. (p r) q intro from 1. Does not follow! e.g. p=f, q=f, r=t
cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference
cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference quantifiers x P(x) P(x) is true for every x in the domain read as for all x, P of x x P x There is an x in the
More informationAdam Blank Spring 2017 CSE 311. Foundations of Computing I
Adam Blank Spring 2017 CSE 311 Foundations of Computing I Pre-Lecture Problem Suppose that p, and p (q r) are true. Is q true? Can you prove it with equivalences? CSE 311: Foundations of Computing Lecture
More informationx P(x) x P(x) CSE 311: Foundations of Computing announcements last time: quantifiers, review: logical Inference Fall 2013 Lecture 7: Proofs
CSE 311: Foundations of Computing Fall 2013 Lecture 7: Proofs announcements Reading assignment Logical inference 1.6-1.7 7 th Edition 1.5-1.7 6 th Edition Homework #2 due today last time: quantifiers,
More informationCSE 311: Foundations of Computing. Lecture 7: Logical Inference
CSE 311: Foundations of Computing Lecture 7: Logical Inference Logical Inference So far we ve considered: How to understand and expressthings using propositional and predicate logic How to compute using
More informationAbout the course. CSE 321 Discrete Structures. Why this material is important. Topic List. Propositional Logic. Administration. From the CSE catalog:
About the course CSE 321 Discrete Structures Winter 2008 Lecture 1 Propositional Logic From the CSE catalog: CSE 321 Discrete Structures (4) Fundamentals of set theory, graph theory, enumeration, and algebraic
More informationPredicate Calculus lecture 1
Predicate Calculus lecture 1 Section 1.3 Limitation of Propositional Logic Consider the following reasoning All cats have tails Gouchi is a cat Therefore, Gouchi has tail. MSU/CSE 260 Fall 2009 1 MSU/CSE
More informationToday. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology
1 Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007 Suprakash Datta datta@cs.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cs.yorku.ca/course/1019
More informationSection Summary. Section 1.5 9/9/2014
Section 1.5 Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements into Statements involving Nested Quantifiers Translated
More informationPredicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo
Predicate Logic CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo c Xin He (University at Buffalo) CSE 191 Discrete Structures 1 / 22 Outline 1 From Proposition to Predicate
More informationPREDICATE LOGIC. Schaum's outline chapter 4 Rosen chapter 1. September 11, ioc.pdf
PREDICATE LOGIC Schaum's outline chapter 4 Rosen chapter 1 September 11, 2018 margarita.spitsakova@ttu.ee ICY0001: Lecture 2 September 11, 2018 1 / 25 Contents 1 Predicates and quantiers 2 Logical equivalences
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 informationFormal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures
Formal Logic: Quantifiers, Predicates, and Validity CS 130 Discrete Structures Variables and Statements Variables: A variable is a symbol that stands for an individual in a collection or set. For example,
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 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 informationMAT2345 Discrete Math
Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview
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 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 / 21 Predicate Logic
More informationDiscrete Mathematics and Its Applications
Discrete Mathematics and Its Applications Lecture 1: The Foundations: Logic and Proofs (1.3-1.5) MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 19, 2017 Outline 1 Logical
More information3. The Logic of Quantified Statements Summary. Aaron Tan August 2017
3. The Logic of Quantified Statements Summary Aaron Tan 28 31 August 2017 1 3. The Logic of Quantified Statements 3.1 Predicates and Quantified Statements I Predicate; domain; truth set Universal quantifier,
More informationPredicate Logic. Andreas Klappenecker
Predicate Logic Andreas Klappenecker Predicates A function P from a set D to the set Prop of propositions is called a predicate. The set D is called the domain of P. Example Let D=Z be the set of integers.
More informationPropositional 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
More informationLecture 3 : Predicates and Sets DRAFT
CS/Math 240: Introduction to Discrete Mathematics 1/25/2010 Lecture 3 : Predicates and Sets Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we discussed propositions, which are
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 informationProposi'onal Logic Not Enough
Section 1.4 Proposi'onal Logic Not Enough If we have: All men are mortal. Socrates is a man. Socrates is mortal Compare to: If it is snowing, then I will study discrete math. It is snowing. I will study
More informationPropositional and Predicate Logic
8/24: pp. 2, 3, 5, solved Propositional and Predicate Logic CS 536: Science of Programming, Spring 2018 A. Why Reviewing/overviewing logic is necessary because we ll be using it in the course. We ll be
More informationCSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker
CSCE 222 Discrete Structures for Computing Predicate Logic Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Predicates A function P from a set D to the set Prop of propositions is called a predicate.
More informationLogic Overview, I. and T T T T F F F T F F F F
Logic Overview, I DEFINITIONS A statement (proposition) is a declarative sentence that can be assigned a truth value T or F, but not both. Statements are denoted by letters p, q, r, s,... The 5 basic logical
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 informationReview. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.
Review Propositional Logic Propositions atomic and compound Operators: negation, and, or, xor, implies, biconditional Truth tables A closer look at implies Translating from/ to English Converse, inverse,
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 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 informationMat 243 Exam 1 Review
OBJECTIVES (Review problems: on next page) 1.1 Distinguish between propositions and non-propositions. Know the truth tables (i.e., the definitions) of the logical operators,,,, and Write truth tables for
More informationCS100: 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
More informationLogic, Sets, and Proofs
Logic, Sets, and Proofs David A. Cox and Catherine C. McGeoch Amherst College 1 Logic Logical Operators. A logical statement is a mathematical statement that can be assigned a value either true or false.
More informationECOM 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
More informationWhy Learning Logic? Logic. Propositional Logic. Compound Propositions
Logic Objectives Propositions and compound propositions Negation, conjunction, disjunction, and exclusive or Implication and biconditional Logic equivalence and satisfiability Application of propositional
More informationReview. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions
Review Propositions, propositional operators, truth tables Logical Equivalences. Tautologies & contradictions Some common logical equivalences Predicates & quantifiers Some logical equivalences involving
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 informationFirst order Logic ( Predicate Logic) and Methods of Proof
First order Logic ( Predicate Logic) and Methods of Proof 1 Outline Introduction Terminology: Propositional functions; arguments; arity; universe of discourse Quantifiers Definition; using, mixing, negating
More informationDiscrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques
Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics
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 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 informationCS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.
3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on
More informationICS141: Discrete Mathematics for Computer Science I
ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Originals slides by Dr. Baek and Dr. Still, adapted by J. Stelovsky Based on slides Dr. M. P. Frank and Dr. J.L. Gross
More informationLogical 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
More informationConjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.
Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is
More informationPredicate Calculus - Syntax
Predicate Calculus - Syntax Lila Kari University of Waterloo Predicate Calculus - Syntax CS245, Logic and Computation 1 / 26 The language L pred of Predicate Calculus - Syntax L pred, the formal language
More informationManual of Logical Style
Manual of Logical Style Dr. Holmes January 9, 2015 Contents 1 Introduction 2 2 Conjunction 3 2.1 Proving a conjunction...................... 3 2.2 Using a conjunction........................ 3 3 Implication
More informationA. 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
More informationDiscrete Structures CRN Test 3 Version 1 CMSC 2123 Autumn 2013
. Print your name on your scantron in the space labeled NAME. 2. Print CMSC 223 in the space labeled SUBJECT. 3. Print the date 2-2-203, in the space labeled DATE. 4. Print your CRN, 786, in the space
More informationLogic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:
Logic Logic is a discipline that studies the principles and methods used in correct reasoning It includes: A formal language for expressing statements. An inference mechanism (a collection of rules) to
More information02 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
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 informationLogic: The Big Picture
Logic: The Big Picture A typical logic is described in terms of syntax: what are the legitimate formulas semantics: under what circumstances is a formula true proof theory/ axiomatization: rules for proving
More informationToday s Lecture. ICS 6B Boolean Algebra & Logic. Predicates. Chapter 1: Section 1.3. Propositions. For Example. Socrates is Mortal
ICS 6B Boolean Algebra & Logic Today s Lecture Chapter 1 Sections 1.3 & 1.4 Predicates & Quantifiers 1.3 Nested Quantifiers 1.4 Lecture Notes for Summer Quarter, 2008 Michele Rousseau Set 2 Ch. 1.3, 1.4
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 informationCSE Discrete Structures
CSE 2315 - Discrete Structures Homework 1- Fall 2010 Due Date: Sept. 16 2010, 3:30 pm Statements, Truth Values, and Tautologies 1. Which of the following are statements? a) 3 + 7 = 10 b) All cars are blue.
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 informationPredicates, Quantifiers and Nested Quantifiers
Predicates, Quantifiers and Nested Quantifiers Predicates Recall the example of a non-proposition in our first presentation: 2x=1. Let us call this expression P(x). P(x) is not a proposition because x
More informationQuantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.
Quantifiers 1-17-2008 Here is a (true) statement about real numbers: Every real number is either rational or irrational. I could try to translate the statement as follows: Let P = x is a real number Q
More informationLogic and Proof. Aiichiro Nakano
Logic and Proof Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials Science
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 information2-4: The Use of Quantifiers
2-4: The Use of Quantifiers The number x + 2 is an even integer is not a statement. When x is replaced by 1, 3 or 5 the resulting statement is false. However, when x is replaced by 2, 4 or 6 the resulting
More informationUnit 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
More informationMCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof
MCS-36: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, 010 Methods of Proof Consider a set of mathematical objects having a certain number of operations and relations
More information1 The Foundation: Logic and Proofs
1 The Foundation: Logic and Proofs 1.1 Propositional Logic Propositions( 명제 ) a declarative sentence that is either true or false, but not both nor neither letters denoting propositions p, q, r, s, T:
More informationPart I: Propositional Calculus
Logic Part I: Propositional Calculus Statements Undefined Terms True, T, #t, 1 False, F, #f, 0 Statement, Proposition Statement/Proposition -- Informal Definition Statement = anything that can meaningfully
More informationsoftware design & management Gachon University Chulyun Kim
Gachon University Chulyun Kim 2 Outline Propositional Logic Propositional Equivalences Predicates and Quantifiers Nested Quantifiers Rules of Inference Introduction to Proofs 3 1.1 Propositional Logic
More informationCPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements
CPSC 121: Models of Computation Pre-class quiz #7 is due Wednesday October 16th at 17:00. Assigned reading for the quiz: Epp, 4th edition: 4.1, 4.6, Theorem 4.4.1 Epp, 3rd edition: 3.1, 3.6, Theorem 3.4.1.
More informationMath.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference
Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu
More informationPredicate Logic - Deductive Systems
CS402, Spring 2018 G for Predicate Logic Let s remind ourselves of semantic tableaux. Consider xp(x) xq(x) x(p(x) q(x)). ( xp(x) xq(x) x(p(x) q(x))) xp(x) xq(x), x(p(x) q(x)) xp(x), x(p(x) q(x)) xq(x),
More information1.1 Statements and Compound Statements
Chapter 1 Propositional Logic 1.1 Statements and Compound Statements A statement or proposition is an assertion which is either true or false, though you may not know which. That is, a statement is something
More informationMathematical Logic Part Two
Mathematical Logic Part Two Outline for Today Recap from Last Time The Contrapositive Using Propositional Logic First-Order Logic First-Order Translations Recap from Last Time Recap So Far A propositional
More informationComputational Logic. Recall of First-Order Logic. Damiano Zanardini
Computational Logic Recall of First-Order Logic Damiano Zanardini UPM European Master in Computational Logic (EMCL) School of Computer Science Technical University of Madrid damiano@fi.upm.es Academic
More information1 The Foundation: Logic and Proofs
1 The Foundation: Logic and Proofs 1.1 Propositional Logic Propositions( ) a declarative sentence that is either true or false, but not both nor neither letters denoting propostions p, q, r, s, T: true
More informationPacket #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics
CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes Packet #2: Set Theory & Predicate Calculus Applied Discrete Mathematics Table of Contents Full Adder Information Page 1 Predicate Calculus
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 informationCS 220: Discrete Structures and their Applications. Predicate Logic Section in zybooks
CS 220: Discrete Structures and their Applications Predicate Logic Section 1.6-1.10 in zybooks From propositional to predicate logic Let s consider the statement x is an odd number Its truth value depends
More informationMATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003
MATH 22 Lecture F: 9/18/2003 INFERENCE & QUANTIFICATION Sixty men can do a piece of work sixty times as quickly as one man. One man can dig a post-hole in sixty seconds. Therefore, sixty men can dig a
More informationTransparencies to accompany Rosen, Discrete Mathematics and Its Applications Section 1.3. Section 1.3 Predicates and Quantifiers
Section 1.3 Predicates and Quantifiers A generalization of propositions - propositional functions or predicates.: propositions which contain variables Predicates become propositions once every variable
More informationPredicate Logic & Quantification
Predicate Logic & Quantification Things you should do Homework 1 due today at 3pm Via gradescope. Directions posted on the website. Group homework 1 posted, due Tuesday. Groups of 1-3. We suggest 3. In
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 informationDiscrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1
EECS 70 Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1 Getting Started In order to be fluent in mathematical statements, you need to understand the basic framework of the language
More informationArgument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.
Logic and Proof Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement is called the conclusion. An argument is valid
More informationMATH 2001 MIDTERM EXAM 1 SOLUTION
MATH 2001 MIDTERM EXAM 1 SOLUTION FALL 2015 - MOON Do not abbreviate your answer. Write everything in full sentences. Except calculators, any electronic devices including laptops and cell phones are not
More informationMath.3336: Discrete Mathematics. Nested Quantifiers
Math.3336: Discrete Mathematics Nested Quantifiers Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018
More informationThinking of Nested Quantification
Section 1.5 Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements into Statements involving Nested Quantifiers. Translating
More informationChapter 16. Logic Programming. Topics. Logic Programming. Logic Programming Paradigm
Topics Chapter 16 Logic Programming Introduction Predicate Propositions Clausal Form Horn 2 Logic Programming Paradigm AKA Declarative Paradigm The programmer Declares the goal of the computation (specification
More informationProofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction
Introduction I Proofs Computer Science & Engineering 235 Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu A proof is a proof. What kind of a proof? It s a proof. A proof is a proof. And when
More informationStanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014
Stanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014 Notes for Lecture 9 Mathematical logic is the rigorous study of the way in which we prove the validity of mathematical
More informationExample ( x.(p(x) Q(x))) ( x.p(x) x.q(x)) premise. 2. ( x.(p(x) Q(x))) -elim, 1 3. ( x.p(x) x.q(x)) -elim, x. P(x) x.
Announcements CS311H: Discrete Mathematics More Logic Intro to Proof Techniques Homework due next lecture Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mathematics More Logic Intro
More informationInference and Proofs (1.6 & 1.7)
EECS 203 Spring 2016 Lecture 4 Page 1 of 9 Introductory problem: Inference and Proofs (1.6 & 1.7) As is commonly the case in mathematics, it is often best to start with some definitions. An argument for
More informationLogic and Proof. On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes!
Logic and Proof On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes! 26-Aug-2011 MA 341 001 2 Requirements for Proof 1. Mutual understanding
More informationPropositional and First-Order Logic
Propositional and irst-order Logic 1 Propositional Logic 2 Propositional logic Proposition : A proposition is classified as a declarative sentence which is either true or false. eg: 1) It rained yesterday.
More informationCSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits
CSE 311: Foundations of Computing Lecture 2: More Logic, Equivalence & Digital Circuits Last class: Some Connectives & Truth Tables Negation (not) p p T F F T Disjunction (or) p q p q T T T T F T F T T
More informationProofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007
Proofs Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Fall 2007 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.5, 1.6, and 1.7 of Rosen cse235@cse.unl.edu
More information1.1 Language and Logic
c Oksana Shatalov, Spring 2018 1 1.1 Language and Logic Mathematical Statements DEFINITION 1. A proposition is any declarative sentence (i.e. it has both a subject and a verb) that is either true or false,
More informationAnnouncements. CS311H: Discrete Mathematics. Introduction to First-Order Logic. A Motivating Example. Why First-Order Logic?
Announcements CS311H: Discrete Mathematics Introduction to First-Order Logic Instructor: Işıl Dillig Homework due at the beginning of next lecture Please bring a hard copy of solutions to class! Instructor:
More informationCOMP9414: Artificial Intelligence First-Order Logic
COMP9414, Wednesday 13 April, 2005 First-Order Logic 2 COMP9414: Artificial Intelligence First-Order Logic Overview Syntax of First-Order Logic Semantics of First-Order Logic Conjunctive Normal Form Wayne
More informationDiscrete Structures for Computer Science
Discrete Structures for Computer Science William Garrison bill@cs.pitt.edu 6311 Sennott Square Lecture #4: Predicates and Quantifiers Based on materials developed by Dr. Adam Lee Topics n Predicates n
More information