01---introduction to cs5209; propositional calculus ics5209/slides/slides_01... · 2010-01-18 ·...

104
Introduction to Foundation in Logic and AI Brief Introduction to CS5209 Administrative Matters Propositional Calculus: Declarative Sentences Propositional Calculus: Natural Deduction 01—Introduction to CS5209; Propositional Calculus I CS 5209: Foundation in Logic and AI Martin Henz and Aquinas Hobor January 14, 2010 Generated on Monday 18 th January, 2010, 17:58 CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 1

Upload: others

Post on 26-Mar-2020

22 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

01—Introduction to CS5209; PropositionalCalculus I

CS 5209: Foundation in Logic and AI

Martin Henz and Aquinas Hobor

January 14, 2010

Generated on Monday 18th January, 2010, 17:58CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 1

Page 2: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

1 Introduction to Foundation in Logic and AI

2 Brief Introduction to CS5209

3 Administrative Matters

4 Propositional Calculus: Declarative Sentences

5 Propositional Calculus: Natural Deduction

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 2

Page 3: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

1 Introduction to Foundation in Logic and AIOrigins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

2 Brief Introduction to CS5209

3 Administrative Matters

4 Propositional Calculus: Declarative Sentences

5 Propositional Calculus: Natural DeductionCS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 3

Page 4: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

What is logic?

1 the branch of philosophy dealing with forms and processesof thinking, especially those of inference and scientificmethod,

2 a particular system or theory of logic [according to 1].

(from “The World Book Dictionary”)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 4

Page 5: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Origins of Mathematical Logic

Greek origins

The ancient Greek formulated rules of logic as syllogisms,which can be seen as precursors of formal logic frameworks.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 5

Page 6: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Example of Syllogism

Premise

All men are mortal.

Premise

Socrates is a man.

Conclusion

Therefore, Socrates is mortal.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 6

Page 7: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Historical Notes

Logic traditions in Ancient Greece

Stoic logic: Centers on propositional logic; can be traced backto Euclid of Megara (400 BCE)

Peripatetic logic: Precursor of predicate logic; founded byArtistotle (384–322 BCE), focus on syllogisms

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 7

Page 8: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Logic Throughout the World

Indian logic: Nyaya school of Hindu philosophy, culminatingwith Dharmakirti (7th century CE), and GangeaUpdhyya of Mithila (13th century CE), formalizedinference

Chinese logic: Gongsun Long (325–250 BCE) wrote on logicalarguments and concepts; most famous is the“White Horse Dialogue”; logic typically rejected astrivial by later Chinese philosophers

Islamic logic: Further development of Aristotelian logic,culminating with Algazel (1058–1111 CE)

Medieval logic: Aristotelian; culminating with William ofOckham (1288–1348 CE)

Traditional logic: Port-Royal Logic, influential logic textbook firstpublished in 1665

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 8

Page 9: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Remarks on Ockham

Ockham’s razor (in his own words)

For nothing ought to be posited without a reason given, unlessit is self-evident or known by experience or proved by theauthority of Sacred Scripture.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 9

Page 10: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Remarks on Ockham

Ockham’s razor (in his own words)

For nothing ought to be posited without a reason given, unlessit is self-evident or known by experience or proved by theauthority of Sacred Scripture.

Ockham’s razor (popular version, not found in his writings)

Entia non sunt multiplicanda sine necessitate.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 10

Page 11: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Remarks on Ockham

Ockham’s razor (in his own words)

For nothing ought to be posited without a reason given, unlessit is self-evident or known by experience or proved by theauthority of Sacred Scripture.

Ockham’s razor (popular version, not found in his writings)

Entia non sunt multiplicanda sine necessitate.English: Entities should not be multiplied without necessity.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 11

Page 12: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Remarks on Ockham

Ockham’s razor (in his own words)

For nothing ought to be posited without a reason given, unlessit is self-evident or known by experience or proved by theauthority of Sacred Scripture.

Ockham’s razor (popular version, not found in his writings)

Entia non sunt multiplicanda sine necessitate.English: Entities should not be multiplied without necessity.

Built-in Skepticism

As a result of this ontological parsimony, Ockham states thathuman reason cannot prove the immortality of the soul nor theexistence, unity, and infinity of God.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 12

Page 13: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Propositional Calculus

Study of atomic propositions

Propositions are built from sentences whose internal structureis not of concern.

Building propositions

Boolean operators are used to construct propositions out ofsimpler propositions.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 13

Page 14: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Example for Propositional Calculus

Atomic proposition

One plus one equals two.

Atomic proposition

The earth revolves around the sun.

Combined proposition

One plus one equals two and the earth revolves around thesun.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 14

Page 15: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Goals and Main Result

Meaning of formula

Associate meaning to a set of formulas by assigning a valuetrue or false to every formula in the set.

Proofs

Symbol sequence that formally establishes whether a formulais always true.

Soundness and completeness

The set of provable formulas is the same as the set of formulaswhich are always true.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 15

Page 16: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Uses of Propositional Calculus

Hardware design

The production of logic circuits uses propositional calculus at allphases; specification, design, testing.

Verification

Verification of hardware and software makes extensive use ofpropositional calculus.

Problem solving

Decision problems (scheduling, timetabling, etc) can beexpressed as satisfiability problems in propositional calculus.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 16

Page 17: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Predicate Calculus: Central ideas

Richer language

Instead of dealing with atomic propositions, predicate calculusprovides the formulation of statements involving sets, functionsand relations on these sets.

Quantifiers

Predicate calculus provides statements that all or someelements of a set have specified properties.

Compositionality

Similar to propositional calculus, formulas can be built fromcomposites using logical connectives.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 17

Page 18: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Progamming Language Semantics

The meaning of programs such as

if x >= 0 then y := sqrt(x) else y := abs(x)

can be captured with formulas of predicate calculus:

∀x∀y(x ′ = x ∧ (x ≥ 0 → y ′ =√

x) ∧ (¬(x ≥ 0) → y ′ = |x |))

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 18

Page 19: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Other Uses of Predicate Calculus

Specification: Formally specify the purpose of a program inorder to serve as input for software design,

Verification: Prove the correctness of a program with respect toits specification.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 19

Page 20: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Example for Specification

Let P be a program of the form

while a <> b doif a > b then a := a - b else a:= b - a;

The specification of the program is given by the formula

{a ≥ 0 ∧ b ≥ 0} P {a = gcd(a,b)}

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 20

Page 21: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Theorem Proving and Logic Programming

Theorem proving

Formal logic has been used to design programs that canautomatically prove mathematical theorems.

Logic programming

Research in theorem proving has led to an efficient way ofproving formulas in predicate calculus, called resolution, whichforms the basis for logic programming.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 21

Page 22: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Origins of Mathematical LogicPropositional CalculusPredicate CalculusTheorem Proving and Logic ProgrammingSystems of Logic

Other Systems of Logic

Three-valued logic

A third truth value (denoting “don’t know” or “undetermined”) isoften useful.

Intuitionistic logic

A mathematical object is accepted only if a finite constructioncan be given for it.

Temporal logic

Integrates time-dependent constructs such as (“always” and“eventually”) explicitly into a logic framework; useful forreasoning about real-time systems.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 22

Page 23: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Style: Broad, elementary, rigorousMethod: From Theory to PracticeOverview of Module Content

1 Introduction to Foundation in Logic and AI

2 Brief Introduction to CS5209Style: Broad, elementary, rigorousMethod: From Theory to PracticeOverview of Module Content

3 Administrative Matters

4 Propositional Calculus: Declarative Sentences

5 Propositional Calculus: Natural Deduction

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 23

Page 24: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Style: Broad, elementary, rigorousMethod: From Theory to PracticeOverview of Module Content

Style: Broad, elementary, rigorous

Broad: Cover a good number of logical frameworks

Elementary: Focus on a minimal subset of each framework

Rigorous: Cover topics formally, preparing students foradvanced studies in logic in computer science

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 24

Page 25: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Style: Broad, elementary, rigorousMethod: From Theory to PracticeOverview of Module Content

Method: From Theory to Practice

Cover theory and back it up with practical excercises that applythe theory and give new insights.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 25

Page 26: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Style: Broad, elementary, rigorousMethod: From Theory to PracticeOverview of Module Content

Overview of Module Content

1 Propositional calculus (3 lectures, including today)2 Predicate calculus (3 lectures)3 Verification by Model Checking (1 lectures)4 Program Verification (2 lectures)5 Modal Logics (2 lectures; to be confirmed)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 26

Page 27: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Administrative Matters

Use www.comp.nus.edu.sg/∼cs5209 and IVLE

Textbook

Assignments (one per week, starting next week; marked)

Self-assessments (occasional; not marked)

Discussion forums (IVLE)

Announcements (IVLE)

Webcast (IVLE)

Blog (IVLE, just for fun)

Tutorials (one per week); register!

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 27

Page 28: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

1 Introduction to Foundation in Logic and AI

2 Brief Introduction to CS5209

3 Administrative Matters

4 Propositional Calculus: Declarative Sentences

5 Propositional Calculus: Natural Deduction

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 28

Page 29: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Declarative Sentences

The language of propositional logic is based on propositions ordeclarative sentences.

Declarative Sentences

Sentences which one can—in principle—argue as being true orfalse.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 29

Page 30: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Examples

1 The sum of the numbers 3 and 5 equals 8.2 Jane reacted violently to Jack’s accusations.3 Every natural number > 2 is the sum of two prime

numbers.4 All Martians like pepperoni on their pizza.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 30

Page 31: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Not Examples

Could you please pass me the salt?

Ready, steady, go!

May fortune come your way.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 31

Page 32: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Putting Propositions Together

Example 1.1

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

John is not late for his meeting.

The train did arrive late.

Therefore, there were taxis at the station.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 32

Page 33: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Putting Propositions Together

Example 1.2

If it is raining andJane does not have her umbrella with her thenshe will get wet.

Jane is not wet.

It is raining.

Therefore, Jane has her umbrella with her.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 33

Page 34: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Focus on Structure

We are primarily concerned about the structure of arguments inthis class, not the validity of statements in a particular domain.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 34

Page 35: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Focus on Structure

We are primarily concerned about the structure of arguments inthis class, not the validity of statements in a particular domain.

We therefore simply abbreviate sentences by letters such as p,q, r , p1, p2 etc.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 35

Page 36: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

From Concrete Propositions to Letters

Example 1.1

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

John is not late for his meeting.

The train did arrive late.

Therefore, there were taxis at the station.

becomes

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 36

Page 37: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

From Concrete Propositions to Letters

Example 1.1

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

John is not late for his meeting.

The train did arrive late.

Therefore, there were taxis at the station.

becomes

Letter version

If p and not q, then r . Not r . p. Therefore, q.CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 37

Page 38: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

From Concrete Propositions to Letters

Example 1.2

If it is raining andJane does not have her umbrella with her thenshe will get wet.

Jane is not wet.

It is raining.

Therefore, Jane has her umbrella with her.

has

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 38

Page 39: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

From Concrete Propositions to Letters

Example 1.2

If it is raining andJane does not have her umbrella with her thenshe will get wet.

Jane is not wet.

It is raining.

Therefore, Jane has her umbrella with her.

has

the same letter version

If p and not q, then r . Not r . p. Therefore, q.CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 39

Page 40: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Putting Propositions Together

Sentences like “If p and not q, then r .” occur frequently. Insteadof English words such as “if...then”, “and”, “not”, it is moreconvenient to use symbols such as →, ∧, ¬.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 40

Page 41: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Logical Connectives

¬: negation of p is denoted by ¬p

∨: disjunction of p and r is denoted by p ∨ r , meaningat least one of the two statements is true.

∧: conjunction of p and r is denoted by p ∧ r ,meaning both are true.

→: implication between p and r is denoted by p → r ,meaning that r is a logical consequence of p. p iscalled the antecedent, and r the consequent.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 41

Page 42: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Example 1.1 Revisited

From Example 1.1

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 42

Page 43: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Example 1.1 Revisited

From Example 1.1

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

Symbolic Propositions

We replaced “the train arrives late” by p etc

The statement becomes: If p and not q, then r .

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 43

Page 44: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

Example 1.1 Revisited

From Example 1.1

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

Symbolic Propositions

We replaced “the train arrives late” by p etc

The statement becomes: If p and not q, then r .

Symbolic Connectives

With symbolic connectives, the statement becomes:

p ∧ ¬q → r

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 44

Page 45: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

1 Introduction to Foundation in Logic and AI

2 Brief Introduction to CS5209

3 Administrative Matters

4 Propositional Calculus: Declarative Sentences

5 Propositional Calculus: Natural DeductionSequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 45

Page 46: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Introduction

Objective

We would like to develop a calculus for reasoning aboutpropositions, so that we can establish the validity of statementssuch as Example 1.1.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 46

Page 47: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Introduction

Objective

We would like to develop a calculus for reasoning aboutpropositions, so that we can establish the validity of statementssuch as Example 1.1.

Idea

We introduce proof rules that allow us to derive a formula ψfrom a number of other formulas φ1, φ2, . . . φn.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 47

Page 48: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Introduction

Objective

We would like to develop a calculus for reasoning aboutpropositions, so that we can establish the validity of statementssuch as Example 1.1.

Idea

We introduce proof rules that allow us to derive a formula ψfrom a number of other formulas φ1, φ2, . . . φn.

Notation

We write a sequent φ1, φ2, . . . , φn ⊢ ψto denote that we can derive ψ from φ1, φ2, . . . , φn.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 48

Page 49: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example 1.1 Revisited

English

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

John is not late for his meeting.

The train did arrive late.

Therefore, there were taxis at the station.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 49

Page 50: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example 1.1 Revisited

English

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

John is not late for his meeting.

The train did arrive late.

Therefore, there were taxis at the station.

Sequent

p ∧ ¬q → r ,¬r ,p ⊢ q

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 50

Page 51: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example 1.1 Revisited

English

If the train arrives late andthere are no taxis at the station thenJohn is late for his meeting.

John is not late for his meeting.

The train did arrive late.

Therefore, there were taxis at the station.

Sequent

p ∧ ¬q → r ,¬r ,p ⊢ q

Remaining taskCS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 51

Page 52: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

What Next?

Sequent

p ∧ ¬q → r ,¬r ,p ⊢ q

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 52

Page 53: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

What Next?

Sequent

p ∧ ¬q → r ,¬r ,p ⊢ q

Remaining task

Develop a set of proof rules that allows us to establish suchsequents.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 53

Page 54: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rules for Conjunction

Introduction of Conjunction

φ ψ

φ ∧ ψ[∧i]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 54

Page 55: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rules for Conjunction

Introduction of Conjunction

φ ψ

φ ∧ ψ[∧i]

Elimination of Conjunction

φ ∧ ψ

φ

[∧e1]

φ ∧ ψ

ψ

[∧e2]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 55

Page 56: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example of Proof

To show

p ∧ q, r ⊢ q ∧ r

How to start?

p ∧ q r

q ∧ r

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 56

Page 57: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Proof Step-by-Step

1 p ∧ q (premise)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 57

Page 58: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Proof Step-by-Step

1 p ∧ q (premise)2 r (premise)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 58

Page 59: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Proof Step-by-Step

1 p ∧ q (premise)2 r (premise)3 q (by using Rule ∧e2 and Item 1)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 59

Page 60: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Proof Step-by-Step

1 p ∧ q (premise)2 r (premise)3 q (by using Rule ∧e2 and Item 1)4 q ∧ r (by using Rule ∧i and Items 3 and 2)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 60

Page 61: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Graphical Representation of Proof

p ∧ q

q[∧e2] r

q ∧ r[∧i]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 61

Page 62: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Graphical Representation of Proof

p ∧ q

q[∧e2] r

q ∧ r[∧i]

Find the parts of the corresponding sequent:

p ∧ q, r ⊢ q ∧ r

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 62

Page 63: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Graphical Representation of Proof

p ∧ q

q[∧e2] r

q ∧ r[∧i]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 63

Page 64: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Graphical Representation of Proof

p ∧ q

q[∧e2] r

q ∧ r[∧i]

Find the parts of the corresponding proof:1 p ∧ q (premise)2 r (premise)3 q (by using Rule ∧e2 and Item 1)4 q ∧ r (by using Rule ∧i and Items 3 and 2)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 64

Page 65: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Where are we heading with this?

We would like to prove sequents of the formφ1, φ2, . . . , φn ⊢ ψ

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 65

Page 66: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Where are we heading with this?

We would like to prove sequents of the formφ1, φ2, . . . , φn ⊢ ψWe introduce rules that allow us to form “legal” proofs

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 66

Page 67: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Where are we heading with this?

We would like to prove sequents of the formφ1, φ2, . . . , φn ⊢ ψWe introduce rules that allow us to form “legal” proofs

Then any proof of any formula ψ using the premisesφ1, φ2, . . . , φn is considered “correct”.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 67

Page 68: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Where are we heading with this?

We would like to prove sequents of the formφ1, φ2, . . . , φn ⊢ ψWe introduce rules that allow us to form “legal” proofs

Then any proof of any formula ψ using the premisesφ1, φ2, . . . , φn is considered “correct”.

Can we say that sequents with a correct proof aresomehow “valid”, or “meaningful”?

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 68

Page 69: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Where are we heading with this?

We would like to prove sequents of the formφ1, φ2, . . . , φn ⊢ ψWe introduce rules that allow us to form “legal” proofs

Then any proof of any formula ψ using the premisesφ1, φ2, . . . , φn is considered “correct”.

Can we say that sequents with a correct proof aresomehow “valid”, or “meaningful”?

What does it mean to be meaningful?

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 69

Page 70: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Where are we heading with this?

We would like to prove sequents of the formφ1, φ2, . . . , φn ⊢ ψWe introduce rules that allow us to form “legal” proofs

Then any proof of any formula ψ using the premisesφ1, φ2, . . . , φn is considered “correct”.

Can we say that sequents with a correct proof aresomehow “valid”, or “meaningful”?

What does it mean to be meaningful?

Can we say that any meaningful sequent has a valid proof?

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 70

Page 71: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Where are we heading with this?

We would like to prove sequents of the formφ1, φ2, . . . , φn ⊢ ψWe introduce rules that allow us to form “legal” proofs

Then any proof of any formula ψ using the premisesφ1, φ2, . . . , φn is considered “correct”.

Can we say that sequents with a correct proof aresomehow “valid”, or “meaningful”?

What does it mean to be meaningful?

Can we say that any meaningful sequent has a valid proof?

...but first back to the proof rules...

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 71

Page 72: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rules of Double Negation

¬¬φ

φ

[¬¬e]

φ

¬¬φ[¬¬i]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 72

Page 73: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rule for Eliminating Implication

φ φ→ ψ

ψ

[→ e]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 73

Page 74: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rule for Eliminating Implication

φ φ→ ψ

ψ

[→ e]

Example

p: It rained.

p → q: If it rained, then the street is wet.

We can conclude from these two that the street is indeed wet.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 74

Page 75: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Another Rule for Eliminating Implication

The rule

φ φ→ ψ

ψ

[→ e]

is often called “Modus Ponens” (or MP)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 75

Page 76: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Another Rule for Eliminating Implication

The rule

φ φ→ ψ

ψ

[→ e]

is often called “Modus Ponens” (or MP)

Origin of term

“Modus ponens” is an abbreviation of the Latin “modusponendo ponens” which means in English “mode that affirmsby affirming”. More precisely, we could say “mode that affirmsthe antecedent of an implication”.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 76

Page 77: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

The Twin Sister of Modus Ponens

The rule

φ φ→ ψ

ψ

[→ e]

is called “Modus Ponens” (or MP)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 77

Page 78: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

The Twin Sister of Modus Ponens

The rule

φ φ→ ψ

ψ

[→ e]

is called “Modus Ponens” (or MP)A similar rule

φ→ ψ ¬ψ

¬φ[MT ]

is called “Modus Tollens” (or MT).

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 78

Page 79: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

The Twin Sister of Modus Ponens

The rule

φ→ ψ ¬ψ

¬φ[MT ]

is called “Modus Tollens” (or MT).

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 79

Page 80: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

The Twin Sister of Modus Ponens

The rule

φ→ ψ ¬ψ

¬φ[MT ]

is called “Modus Tollens” (or MT).

Origin of term

“Modus tollens” is an abbreviation of the Latin “modus tollendotollens” which means in English “mode that denies by denying”.More precisely, we could say “mode that denies the consequentof an implication”.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 80

Page 81: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example

p → (q → r),p,¬r ⊢ ¬q

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 81

Page 82: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example

p → (q → r),p,¬r ⊢ ¬q

1 p → (q → r) premise

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 82

Page 83: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example

p → (q → r),p,¬r ⊢ ¬q

1 p → (q → r) premise2 p premise

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 83

Page 84: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example

p → (q → r),p,¬r ⊢ ¬q

1 p → (q → r) premise2 p premise3 ¬r premise

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 84

Page 85: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example

p → (q → r),p,¬r ⊢ ¬q

1 p → (q → r) premise2 p premise3 ¬r premise4 q → r →e 1,2

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 85

Page 86: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example

p → (q → r),p,¬r ⊢ ¬q

1 p → (q → r) premise2 p premise3 ¬r premise4 q → r →e 1,25 ¬q MT 4,3

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 86

Page 87: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

How to introduce implication?

Compare the sequent (MT)

p → q,¬q ⊢ ¬p

with the sequentp → q ⊢ ¬q → ¬p

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 87

Page 88: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

How to introduce implication?

Compare the sequent (MT)

p → q,¬q ⊢ ¬p

with the sequentp → q ⊢ ¬q → ¬p

The second sequent should be provable, but we don’t have arule to introduce implication yet!

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 88

Page 89: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

A Proof We Would Like To Have

p → q ⊢ ¬q → ¬p

1 p → q premise

2 ¬q assumption3 ¬p MT 1,2

4 ¬q → ¬p →i 2–3

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 89

Page 90: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

A Proof We Would Like To Have

p → q ⊢ ¬q → ¬p

1 p → q premise

2 ¬q assumption3 ¬p MT 1,2

4 ¬q → ¬p →i 2–3

We can start a box with an assumption, and use previouslyproven propositions (including premises) from the outside in thebox.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 90

Page 91: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

A Proof We Would Like To Have

p → q ⊢ ¬q → ¬p

1 p → q premise

2 ¬q assumption3 ¬p MT 1,2

4 ¬q → ¬p →i 2–3

We can start a box with an assumption, and use previouslyproven propositions (including premises) from the outside in thebox.We cannot use assumptions from inside the box in rulesoutside the box.

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 91

Page 92: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rule for Introduction of Implication

φ...ψ

φ→ ψ

[→ i]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 92

Page 93: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rules for Introduction of Disjunction

φ

φ ∨ ψ[∨ii ]

ψ

φ ∨ ψ[∨i2]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 93

Page 94: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Rule for Elimination of Disjunction

φ ∨ ψ

φ...χ

ψ...χ

χ

[∨e]

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 94

Page 95: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Example

1 p ∧ (q ∨ r) premise2 p ∧e1 13 q ∨ r ∧e2 1

4 q assumption5 p ∧ q ∧i 2,46 (p ∧ q) ∨ (p ∧ r) ∨i1 5

7 r assumption8 p ∧ r ∧i 2,79 (p ∧ q) ∨ (p ∧ r) ∨i2 8

10 (p ∧ q) ∨ (p ∧ r) ∨e 3, 4–6, 7–9

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 95

Page 96: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Summary

Interested in relationships between propositions, not thecontent of individual propositions

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 96

Page 97: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Summary

Interested in relationships between propositions, not thecontent of individual propositions

Build propositions (p ∧ q) out of primitive ones p and q

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 97

Page 98: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Summary

Interested in relationships between propositions, not thecontent of individual propositions

Build propositions (p ∧ q) out of primitive ones p and q

Introduce rules that allow us construct proofs

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 98

Page 99: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Summary

Interested in relationships between propositions, not thecontent of individual propositions

Build propositions (p ∧ q) out of primitive ones p and q

Introduce rules that allow us construct proofs

Remaining tasks:

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 99

Page 100: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Summary

Interested in relationships between propositions, not thecontent of individual propositions

Build propositions (p ∧ q) out of primitive ones p and q

Introduce rules that allow us construct proofs

Remaining tasks:

What are formulas? (syntax)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 100

Page 101: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Summary

Interested in relationships between propositions, not thecontent of individual propositions

Build propositions (p ∧ q) out of primitive ones p and q

Introduce rules that allow us construct proofs

Remaining tasks:

What are formulas? (syntax)

What is the meaning of formulas? (validity; semantics)

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 101

Page 102: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Summary

Interested in relationships between propositions, not thecontent of individual propositions

Build propositions (p ∧ q) out of primitive ones p and q

Introduce rules that allow us construct proofs

Remaining tasks:

What are formulas? (syntax)

What is the meaning of formulas? (validity; semantics)

What is the relationship between provable formulas andvalid formulas?

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 102

Page 103: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),

Introduction to Foundation in Logic and AIBrief Introduction to CS5209

Administrative MattersPropositional Calculus: Declarative Sentences

Propositional Calculus: Natural Deduction

SequentsRules for ConjunctionRules for Double Negation and ImplicationRules for Disjunction

Next Week

More rules for negation

Excursion: Intuitionistic logic

Propositional logic as a formal language

Semantics of propositional logic

CS 5209: Foundation in Logic and AI 01—Introduction to CS5209; Propositional Calculus I 103

Page 104: 01---Introduction to CS5209; Propositional Calculus Ics5209/slides/slides_01... · 2010-01-18 · with Dharmakirti (7th century CE), and Gangea Updhyya of Mithila (13th century CE),