lecture 5 & 6yzhan442/teaching/cse259/lectures/cse259-… · cse 259 logic in computer science...

13
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

Upload: others

Post on 07-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

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

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

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

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

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

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

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

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

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

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

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

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

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

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