cs4004/cs4504: formal verification
|
|
- Leslie Gallagher
- 5 years ago
- Views:
Transcription
1 cs4004/cs4504: formal verification Lecture 11: Proofs in First Order Logic and classical vs. intuitionistic logic Vasileios Koutavas School of Computer Science and Statistics Trinity College Dublin
2 Proofs in First Order Logic
3 first order logic rules (1/2) A 1 A 2 i A 1 A 2 A 1 A 2 A 1 e 1 A 1 A 2 A 2 e 2 A 1 A 1 A 2 i 1 A 2 A 1 A 2 i 2 A 1 A 2 A A e A B A B i A A B B A A i A e e A 1 B B A 2 B A e* A e *Only in classical FOL 2
4 first order logic rules (2/2) t = t =i (reflexivity) t 1 = t 2 A[t 1 /x] A[t 2 /x] =e t 1 = t 2 t 2 = t 1 =sym t 1 = t 2 t 2 = t 3 t 1 = t 3 =trans A[t/x] x.a i x.a A[t/x] e x.a x 0 A[x 0 /x] x 0 x.a C i A[x 0 /x] C e 3
5 useful theorems from propositional logic When we prove first order logic sequents we often use known theorems to shorten our proofs. Some of these theorems we express as derived rules. Theorem (Law of Excluded Middle ) A A or equivalently A A LEM * Only in classical logic (stay tuned). 4
6 useful theorems in first-order logic Theorem x.a x. A x.a x. A 5
7 more theorems let x not appear free in B. Then x.b B x.b B 6
8 more theorems let x not appear free in B. Then x.b B x.b B ( x.a) B x.(a B) ( x.a) B x.(a B) ( x.a) B x.(a B) ( x.a) B x.(a B) 6
9 more theorems let x not appear free in B. Then x.b B x.b B ( x.a) B x.(a B) ( x.a) B x.(a B) ( x.a) B x.(a B) ( x.a) B x.(a B) x.(b A) B ( x.a) x.(a B) ( x.a) B x.(b A) B ( x.a) x.(a B) ( x.a) B 6
10 even more theorems ( x.a) ( x.b) x.(a B) ( x.a) ( x.b) x.(a B) 7
11 even more theorems ( x.a) ( x.b) x.(a B) ( x.a) ( x.b) x.(a B) x. y.a y. x.a x. y.a y. x.a 7
12 even more theorems ( x.a) ( x.b) x.(a B) ( x.a) ( x.b) x.(a B) x. y.a y. x.a x. y.a y. x.a wrong: x. y.a y. x.a wrong: x. y.a y. x.a 7
13 Classical vs. Constructive logic
14 first order logic rules (1/2) A 1 A 2 i A 1 A 2 A 1 A 2 A 1 e 1 A 1 A 2 A 2 e 2 A 1 A 1 A 2 i 1 A 2 A 1 A 2 i 2 A 1 A 2 A A e A B A B i A A B B A A i A e e A 1 B B A 2 B A e A e Only in classical FOL 9
15 first order logic rules (2/2) t = t =i (reflexivity) t 1 = t 2 A[t 1 /x] A[t 2 /x] =e t 1 = t 2 t 2 = t 1 =sym t 1 = t 2 t 2 = t 3 t 1 = t 3 =trans A[t/x] x.a i x.a A[t/x] e x.a x 0 A[x 0 /x] x 0 x.a C i A[x 0 /x] C e 10
16 classical logic Consider the sequent x.(p(x) y.p(y)) To prove this we need use rule i and provide a term t for which we can show (P(t) y.p(y)) 11
17 classical logic Consider the sequent x.(p(x) y.p(y)) To prove this we need use rule i and provide a term t for which we can show (P(t) y.p(y)) Classically this is a tautology: If y.p(y) holds then we can pick arbitrarily term t 0 and show P(t 0 ) y.p(y) using rule i (also see truth table of implication). 11
18 classical logic Consider the sequent x.(p(x) y.p(y)) To prove this we need use rule i and provide a term t for which we can show (P(t) y.p(y)) Classically this is a tautology: If y.p(y) holds then we can pick arbitrarily term t 0 and show P(t 0 ) y.p(y) using rule i (also see truth table of implication). If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) 11
19 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) 12
20 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) 12
21 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 12
22 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 if P(x) = odd(x) then t 1 can be 4 12
23 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 if P(x) = odd(x) then t 1 can be 4 if P(x) = (x 1000) then t 1 can be
24 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 if P(x) = odd(x) then t 1 can be 4 if P(x) = (x 1000) then t 1 can be
25 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 if P(x) = odd(x) then t 1 can be 4 if P(x) = (x 1000) then t 1 can be 1001 we can t provide a t 1 if we don t know P and the parameters F, P 12
26 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 if P(x) = odd(x) then t 1 can be 4 if P(x) = (x 1000) then t 1 can be 1001 we can t provide a t 1 if we don t know P and the parameters F, P but there is always one. 12
27 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 if P(x) = odd(x) then t 1 can be 4 if P(x) = (x 1000) then t 1 can be 1001 we can t provide a t 1 if we don t know P and the parameters F, P but there is always one. Classical logic is OK with that! 12
28 classical logic However notice how we didn t have to provide any concrete term t 1 in the second case to complete the proof of x.(p(x) y.p(y)) Let s see this again: If y.p(y) then there exists a term t 1 such that P(t 1 ), which we can use to show P(t 1 ) y.p(y) Assume logic s terms F contain natural numbers and predicates P standard predicates over them. if P(x) = even(x) then t 1 can be 3 if P(x) = odd(x) then t 1 can be 4 if P(x) = (x 1000) then t 1 can be 1001 we can t provide a t 1 if we don t know P and the parameters F, P but there is always one. Classical logic is OK with that! Constructive logic is not! It requires us to give a concrete t 1, before we know what P is. 12
29 example classical proof Theorem There are irrational a and b for which a b is rational. Proof. We know that 2 is irrational (known theorem of arithmetic which we will not prove here). Suppose 2 2 is rational. Then pick a = b = 2 and we re done. Otherwise 2 2 is irrational. Pick a = 2 2 and b = 2. which is rational. ( 2 ) 2 a b 2 = = = 2 = 2 13
30 example classical proof Theorem There are irrational a and b for which a b is rational. Proof. We know that 2 is irrational (known theorem of arithmetic which we will not prove here). Suppose 2 2 is rational. Then pick a = b = 2 and we re done. Otherwise 2 2 is irrational. Pick a = 2 2 and b = 2. which is rational. ( 2 ) 2 a b 2 = = = 2 = 2 Correct but we never identified two definitely irrational numbers a and b. 13
31 example classical proof Theorem There are irrational a and b for which a b is rational. Proof. We know that 2 is irrational (known theorem of arithmetic which we will not prove here). Suppose 2 2 is rational. Then pick a = b = 2 and we re done. Otherwise 2 2 is irrational. Pick a = 2 2 and b = 2. which is rational. ( 2 ) 2 a b 2 = = = 2 = 2 Correct but we never identified two definitely irrational numbers a and b. In fact knowing whether 2 2 is rational is a difficult problem! 13
32 example classical proof Consider the predicate A(n, m) = def (({n}(n) ) (m = 0)) ((m = 0) ({n}(n) )) where {n}(n) means the n th turing machine given n as an input terminates. Prove: x. y.a(x, y) Proof. We need to use rule i, and prove for arbitrary n: y.a(n, y) 14
33 example classical proof Consider the predicate A(n, m) = def (({n}(n) ) (m = 0)) ((m = 0) ({n}(n) )) where {n}(n) means the n th turing machine given n as an input terminates. Prove: x. y.a(x, y) Proof. We need to use rule i, and prove for arbitrary n: y.a(n, y) If {n}(n) then pick y = 0. Otherwise pick y = 1. 14
34 example classical proof Consider the predicate A(n, m) = def (({n}(n) ) (m = 0)) ((m = 0) ({n}(n) )) where {n}(n) means the n th turing machine given n as an input terminates. Prove: x. y.a(x, y) Proof. We need to use rule i, and prove for arbitrary n: y.a(n, y) If {n}(n) then pick y = 0. Otherwise pick y = 1. Here we can think of the two cases as appealing to some oracle that knows the truth of turing machine termination. Our proof works by case analysis on what the oracle would answer. Constructive logic does not want to have proofs involving appealing to an oracle. Constructive proofs can be translated into programs! 14
35 classical rule The rule that allows us to do classical proofs is this: A A e This rule is in fact equivalent to the following rules: LEM(Law of Excluded Middle) A A A A PBC(Proof by contradictio ((A B) A) A In fact from any of the 3 we can derive the other two. 15
36 classical proof 1 Prove LEM using e A A A A e 16
37 classical proof 2 Prove using e ((A B) A) A A A e 17
38 classical proof 3 Prove using LEM ((A B) A) A A A LEM 18
39 classical proof 4 Prove using PBC ((A B) A) A A A PBC 19
40 classical proof 5 Prove the following using PBC x.a x. A A A PBC 20
41 classical proof 6 Prove the following using e x.a x. A A A e 21
42 classical proof 7 Prove the following using LEM x.a x. A A A LEM 22
43 FOL English
44 fol example 1 Let F be the set of terms containing people s names; e.g., alice 0, bob 0, carol 0, etc. It also contains the term function m 1 which returns the mother of any person. Moreover consider the set of predicates P which contains the predicate P 1, which means that a person is poor. Express in FOL: If there is a rich person, and every poor person has a rich mother, then there exists a rich person with a rich grandmonther. Prove the above statement. 24
45 fol example 2 Consider the following sentences: 1. All actors and journalists invited to the party are late. 2. There is at least a person who is on time. 3. There is at least an invited person who is neither a journalist nor an actor. Formalize the sentences. Prove that (3) is not a logical consequence of (1) and (2). 25
Introduction 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 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 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 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 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 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 informationTHE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.
CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS SECTION 3.1 Predicates and Quantified Statements I Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. Predicates
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 informationCSE 311: Foundations of Computing. Lecture 6: More Predicate Logic
CSE 311: Foundations of Computing Lecture 6: More Predicate Logic 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,
More informationExercises. Exercise Sheet 1: Propositional Logic
B Exercises Exercise Sheet 1: Propositional Logic 1. Let p stand for the proposition I bought a lottery ticket and q for I won the jackpot. Express the following as natural English sentences: (a) p (b)
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 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 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 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 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 informationPredicate Logic: Introduction and Translations
Predicate Logic: Introduction and Translations Alice Gao Lecture 10 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour, D. Maftuleac, C. Roberts, R. Trefler, and P. Van Beek 1/29 Outline Predicate
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 informationPredicate Logic: Syntax
Predicate Logic: Syntax Alice Gao Lecture 12 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour, D. Maftuleac, C. Roberts, R. Trefler, and P. Van Beek 1/31 Outline Syntax of Predicate Logic Learning
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method
Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL
More informationMotivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory
Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure
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 logic (revision) & semantic entailment. p. 1/34
Propositional logic (revision) & semantic entailment p. 1/34 Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.)
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 informationYork University. Faculty of Science and Engineering MATH 1090, Section M Final Examination, April NAME (print, in ink): Instructions, remarks:
York University Faculty of Science and Engineering MATH 1090, Section M ination, NAME (print, in ink): (Family name) (Given name) Instructions, remarks: 1. In general, carefully read all instructions in
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 informationFormal (Natural) Deduction for Predicate Calculus
Formal (Natural) Deduction for Predicate Calculus Lila Kari University of Waterloo Formal (Natural) Deduction for Predicate Calculus CS245, Logic and Computation 1 / 42 Formal deducibility for predicate
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 informationMath 535: Topology Homework 1. Mueen Nawaz
Math 535: Topology Homework 1 Mueen Nawaz Mueen Nawaz Math 535 Topology Homework 1 Problem 1 Problem 1 Find all topologies on the set X = {0, 1, 2}. In the list below, a, b, c X and it is assumed that
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 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 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 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 informationHomework 3: Solutions
Homework 3: Solutions ECS 20 (Fall 2014) Patrice Koehl koehl@cs.ucdavis.edu October 16, 2014 Exercise 1 Show that this implication is a tautology, by using a table of truth: [(p q) (p r) (q r)] r. p q
More informationPredicate in English. Predicates and Quantifiers. Predicate in Logic. Propositional Functions: Prelude. Propositional Function
Predicates and Quantifiers Chuck Cusack Predicate in English In English, a sentence has 2 parts: the subject and the predicate. The predicate is the part of the sentence that states something about the
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 informationDiscrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1
CS 70 Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1 Course Outline CS70 is a course on "Discrete Mathematics and Probability for Computer Scientists." The purpose of the course
More informationExercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.
1. Find the truth tables of each of the following compound statements. (a) ( (p q)) (p q), p q p q (p q) q p q ( (p q)) (p q) 0 0 0 1 1 1 1 0 1 0 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 0 1 0 (b) [p ( p q)] [( (p
More information15414/614 Optional Lecture 1: Propositional Logic
15414/614 Optional Lecture 1: Propositional Logic Qinsi Wang Logic is the study of information encoded in the form of logical sentences. We use the language of Logic to state observations, to define concepts,
More informationAutomata Theory and Formal Grammars: Lecture 1
Automata Theory and Formal Grammars: Lecture 1 Sets, Languages, Logic Automata Theory and Formal Grammars: Lecture 1 p.1/72 Sets, Languages, Logic Today Course Overview Administrivia Sets Theory (Review?)
More informationFirst-Order Logic. Chapter Overview Syntax
Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts
More informationNotes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013
Notes on Satisfiability-Based Problem Solving First Order Logic David Mitchell mitchell@cs.sfu.ca October 23, 2013 Preliminary draft. Please do not distribute. Corrections and suggestions welcome. In this
More informationLogic 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:
More informationBound and Free Variables. Theorems and Proofs. More valid formulas involving quantifiers:
Bound and Free Variables More valid formulas involving quantifiers: xp(x) x P(x) Replacing P by P, we get: x P(x) x P(x) Therefore x P(x) xp(x) Similarly, we have xp(x) x P(x) x P(x) xp(x) i(i 2 > i) is
More informationCS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach you about:
CS 70 Discrete Mathematics for CS Fall 2006 Papadimitriou & Vazirani Lecture 1 Course Outline CS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach
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 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 informationPropositional Calculus. Problems. Propositional Calculus 3&4. 1&2 Propositional Calculus. Johnson will leave the cabinet, and we ll lose the election.
1&2 Propositional Calculus Propositional Calculus Problems Jim Woodcock University of York October 2008 1. Let p be it s cold and let q be it s raining. Give a simple verbal sentence which describes each
More informationRecall that the expression x > 3 is not a proposition. Why?
Predicates and Quantifiers Predicates and Quantifiers 1 Recall that the expression x > 3 is not a proposition. Why? Notation: We will use the propositional function notation to denote the expression "
More informationHomework assignment 1: Solutions
Math 240: Discrete Structures I Due 4:30pm Friday 29 September 2017. McGill University, Fall 2017 Hand in to the mailbox at Burnside 1005. Homework assignment 1: Solutions Discussing the assignment with
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 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 informationFor all For every For each For any There exists at least one There exists There is Some
Section 1.3 Predicates and Quantifiers Assume universe of discourse is all the people who are participating in this course. Also let us assume that we know each person in the course. Consider the following
More informationCSE 4111/5111/6111 Computability Jeff Edmonds Assignment 3: Diagonalization & Halting Problem Due: One week after shown in slides
CSE 4111/5111/6111 Computability Jeff Edmonds Assignment 3: Diagonalization & Halting Problem Due: One week after shown in slides First Person: Second Person: Family Name: Family Name: Given Name: Given
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 informationI thank the author of the examination paper on which sample paper is based. VH
I thank the author of the examination paper on which sample paper is based. VH 1. (a) Which of the following expressions is a sentence of L 1 or an abbreviation of one? If an expression is neither a sentence
More informationIntroduction to Decision Sciences Lecture 2
Introduction to Decision Sciences Lecture 2 Andrew Nobel August 24, 2017 Compound Proposition A compound proposition is a combination of propositions using the basic operations. For example (p q) ( p)
More informationQuestion 1 (a). Explain different logical connectives with the help of examples. Ans: Logical Connectivity:-
Course Code : MCS-013 Course Title : Discrete Mathematics Assignment Number : MCA(1)/013/Assignment/17-18 Maximum Marks : 100 Weightage : 25% Last Dates for Submission : 15th October, 2017 (For July 2017
More informationCSCI Homework Set 1 Due: September 11, 2018 at the beginning of class
CSCI 3310 - Homework Set 1 Due: September 11, 2018 at the beginning of class ANSWERS Please write your name and student ID number clearly at the top of your homework. If you have multiple pages, please
More informationLecture 9 CS 1813 Discrete Mathematics. Predicate Calculus. Propositions Plus Plus
Lecture 9 CS 1813 Discrete Mathematics Predicate Calculus Propositions Plus Plus 1 Predicate What is a Predicate? Parameterized collection of propositions P(x) Typically a different proposition for each
More informationExercises 1 - Solutions
Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note
More informationChoosing Logical Connectives
Choosing Logical Connectives 1. Too Few Connectives?: We have chosen to use only 5 logical connectives in our constructed language of logic, L1 (they are:,,,, and ). But, we might ask, are these enough?
More informationLecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel
Lecture Notes on DISCRETE MATHEMATICS Eusebius Doedel c Eusebius J. Doedel, 009 Contents Logic. Introduction............................................................................... Basic logical
More informationIntelligent 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
More informationIntroduction 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)
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 informationThe Curry-Howard Isomorphism
The Curry-Howard Isomorphism Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) The Curry-Howard Isomorphism MFES 2008/09
More informationSome Applications of MATH 1090 Techniques
1 Some Applications of MATH 1090 Techniques 0.1 A simple problem about Nand gates in relation to And gates and inversion (Not) Gates. In this subsection the notation A means that A is proved from the axioms
More informationBefore you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.
Chapter 2 Mathematics and Logic Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here. 2.1 A Taste of Number Theory In this section, we will
More informationIntroduction to Logic
Introduction to Logic 1 What is Logic? The word logic comes from the Greek logos, which can be translated as reason. Logic as a discipline is about studying the fundamental principles of how to reason
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 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 informationCHAPTER 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
More informationQuantifiers. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February, 2018
Quantifiers Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February, 2018 Alice E. Fischer Quantifiers... 1/34 1 Predicates and their Truth Sets Sets of Numbers 2 Universal Quantifiers Existential
More information03 Propositional Logic II
Martin Henz February 12, 2014 Generated on Wednesday 12 th February, 2014, 09:49 1 Review: Syntax and Semantics of Propositional Logic 2 3 Propositional Atoms and Propositions Semantics of Formulas Validity,
More informationLecture Notes on Quantification
Lecture Notes on Quantification 15-317: Constructive Logic Frank Pfenning Lecture 5 September 8, 2009 1 Introduction In this lecture, we introduce universal and existential quantification As usual, we
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 informationCHAPTER 11. Introduction to Intuitionistic Logic
CHAPTER 11 Introduction to Intuitionistic Logic Intuitionistic logic has developed as a result of certain philosophical views on the foundation of mathematics, known as intuitionism. Intuitionism was originated
More informationWUCT121. Discrete Mathematics. Logic. Tutorial Exercises
WUCT11 Discrete Mathematics Logic Tutorial Exercises 1 Logic Predicate Logic 3 Proofs 4 Set Theory 5 Relations and Functions WUCT11 Logic Tutorial Exercises 1 Section 1: Logic Question1 For each of the
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 informationA Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35
EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,
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 informationCS280, Spring 2004: Final
CS280, Spring 2004: Final 1. [4 points] Which of the following relations on {0, 1, 2, 3} is an equivalence relation. (If it is, explain why. If it isn t, explain why not.) Just saying Yes or No with no
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 informationMAI0203 Lecture 7: Inference and Predicate Calculus
MAI0203 Lecture 7: Inference and Predicate Calculus Methods of Artificial Intelligence WS 2002/2003 Part II: Inference and Knowledge Representation II.7 Inference and Predicate Calculus MAI0203 Lecture
More informationhttps://vu5.sfc.keio.ac.jp/slide/
1 FUNDAMENTALS OF LOGIC NO.7 PREDICATE LOGIC Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical Connectives (,,, ) Truth Table Tautology
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 informationStructuring Logic with Sequent Calculus
Structuring Logic with Sequent Calculus Alexis Saurin ENS Paris & École Polytechnique & CMI Seminar at IIT Delhi 17th September 2004 Outline of the talk Proofs via Natural Deduction LK Sequent Calculus
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 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 informationTheorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)
Week 1: Logic Lecture 1, 8/1 (Sections 1.1 and 1.3) Examples of theorems and proofs Theorem (Pythagoras). Let ABC be a right triangle, with legs of lengths a and b, and hypotenuse of length c. Then a +
More informationUniversity of California, San Diego Department of Computer Science and Engineering CSE 20. Solutions to Midterm Exam Winter 2018
University of California, San Diego Department of Computer Science and Engineering CSE 20 Solutions to Midterm Exam Winter 2018 Problem 1 (30 points) a. The boolean function f(p, q) = (q p) ( q p) is specified
More informationPredicate Logic: Sematics Part 1
Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with
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 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 informationFinal Exam Theory Quiz Answer Page
Philosophy 120 Introduction to Logic Final Exam Theory Quiz Answer Page 1. (a) is a wff (and a sentence); its outer parentheses have been omitted, which is permissible. (b) is also a wff; the variable
More informationLecture 11: Measuring the Complexity of Proofs
IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 11: Measuring the Complexity of Proofs David Mix Barrington and Alexis Maciel July
More informationTopics in Logic and Proofs
Chapter 2 Topics in Logic and Proofs Some mathematical statements carry a logical value of being true or false, while some do not. For example, the statement 4 + 5 = 9 is true, whereas the statement 2
More informationChapter 2: The Logic of Quantified Statements. January 22, 2010
Chapter 2: The Logic of Quantified Statements January 22, 2010 Outline 1 2.1- Introduction to Predicates and Quantified Statements I 2 2.2 - Introduction to Predicates and Quantified Statements II 3 2.3
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 informationcse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018
cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018 Chapter 7 Introduction to Intuitionistic and Modal Logics CHAPTER 7 SLIDES Slides Set 1 Chapter 7 Introduction to Intuitionistic and Modal Logics
More information