Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science...
Transcript of Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science...
![Page 1: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/1.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Lecture 5 & 6
Natural deduction for propositional logic
1
![Page 2: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/2.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Natural Deduction Rules: Implication Introduction
2
![Page 3: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/3.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Implication Introduction Examples
3
![Page 4: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/4.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Implication Introduction Examples
4
![Page 5: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/5.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Lewis Carroll Puzzle (I) Derive an inescapable conclusion using all of these: a) All babies are illogical b) Nobody is despised who can manage a crocodile c) Illogical persons are despised
• B: it is a baby • L: it is logical • M: it can manage a crocodile • D: it is despised
a) 𝐵→¬𝐿 b) 𝑀→¬𝐷 c) ¬𝐿→𝐷
5
![Page 6: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/6.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Announcement
6
• 1. Homework 2: comments on Blackboard, later will be paper-based, tonight • 2. Recitation: attend your own session unless there is a reason (in which case you
need to inform your TA (Arpit) to avoid points being deducted) • 3. Homework should be prepared in Latex on Overleaf; 50% deduction this time. • 4. Homework 3 will be there by Friday. • 5. First quiz: Monday (Feb 6) • 6. Piazza registration: 37 already registered.
![Page 7: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/7.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Natural Deduction Rules: Disjunction
7
![Page 8: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/8.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Natural Deduction Rules: Disjunction
8
![Page 9: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/9.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Natural Deduction Rules: Disjunction • Example: (𝑝∨𝑞)∨𝑟⊢𝑝∨(𝑞∨𝑟)
9
![Page 10: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/10.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Natural Deduction Rules: Disjunction • Example: (𝑝∨𝑞)∨𝑟⊢𝑝∨(𝑞∨𝑟)
10
![Page 11: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/11.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Natural Deduction Rules: Negation
11
![Page 12: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/12.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Natural Deduction Rules: Negation
12
![Page 13: Lecture 5 & 6yzhan442/teaching/CSE259/Lectures/CSE259-… · CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer](https://reader034.fdocuments.in/reader034/viewer/2022052021/603604e494125d39e519f9b4/html5/thumbnails/13.jpg)
CSE 259 Logic in Computer Science (Spring 2017) – Yu (“Tony”) Zhang [Slides adapted from CSE 294 Logic in Computer Science – Joohyung Lee]
Lewis Carroll Puzzle (I) Derive an inescapable conclusion using all of these: a) All babies are illogical b) Nobody is despised who can manage a crocodile c) Illogical persons are despised
• B: it is a baby • L: it is logical • M: it can manage a crocodile • D: it is despised
a) 𝐵→¬𝐿 b) 𝑀→¬𝐷 c) ¬𝐿→𝐷
13