Logical Structures Lecture 1. Declarative Sentences and Natural Deduction
Logical Structures Lecture 1. Declarative Sentences and Natural Deduction
Spring, 2021
1 Declarative sentences
2 Natural deduction
Rules for natural deduction
Derived rules
Provable equivalence
Proof by contradiction
Examples
Example 1.1
If the train arrives late and there are no taxis at the station, then John is
late for his meeting. John is not late for his meeting. The train did arrive
late. Therefore, there were taxis at the station.
Examples
Example 1.1
If the train arrives late and there are no taxis at the station, then John is
late for his meeting. John is not late for his meeting. The train did arrive
late. Therefore, there were taxis at the station.
Example 1.2
If it is raining and Jane does not have her umbrella with her, then she will
get wet. Jane is not wet. It is raining. Therefore, Jane has her umbrella
with her.
Examples
Example 1.3
If Superman were able and willing to prevent evil, he would do so. If
Superman were unable to prevent evil, he would be impotent; if he were
unwilling to prevent evil, he would be malevolent. Superman does not
prevent evil. If Superman exists, he is neither impotent nor malevolent.
Therefore, Superman does not exist.
Declarative Sentences
Definition 1.4
Declarative sentence is a sentence that declares a fact.
Declarative Sentences
Definition 1.4
Declarative sentence is a sentence that declares a fact.
Example 1.5
Declarative sentences
1 The sum of the numbers 3 and 5 equals 8.
2 Jane reacted violently to Jacks accusations.
3 Every even natural number > 2 is the sum of two prime numbers
(Goldbach’s conjecture).
4 All Martians like pepperoni on their pizza.
5 Albert Camus était un écrivain français.
6 Die Wur̈de des Menschen ist unantastbar.
Declarative Sentences
Example 1.6
Not declarative sentences
1 What time is it?
2 No smoking!
3 What a beautiful day!
4 Could you please pass me the salt?
5 Ready, steady, go!
6 May fortune come your way.
Declarative Sentences
Symbolic design
Symbolic design
Symbolic design
Binding priorities
Complex sentence:
p ∧ q → ¬r ∨ q
means ‘if p and q then not r or q’
A computer would require the insertion of brackets
(p ∧ q) → ((¬r) ∨ q)
Convention
¬ binds more tightly than ∨ and ∧, and the latter two bind more tightly
than →. Implication → is right-associative: expressions of the form
p → q → r denote p → (q → r).
Binding priorities
1 ¬p ∧ q → r
2 (p → q) → (r → s ∨ t)
3 p ∨ q → ¬p ∧ r
Introduction
Introduction
Introduction
Example 2.1
If the train arrives late and there are no taxis at the station, then John is
late for his meeting. John is not late for his meeting. The train did arrive
late. Therefore, there were taxis at the station.
Example 2.2
If it is raining and Jane does not have her umbrella with her, then she will
get wet. Jane is not wet. It is raining. Therefore, Jane has her umbrella
with her.
Sequent : p ∧ ¬q → r, ¬r, p ` q.
Greek letters
and-elimination:
fill the gap between the premises and the conclusion by applying a
suitable sequence of proof rules
fill the gap between the premises and the conclusion by applying a
suitable sequence of proof rules
Example 2.4
The proof for the sequent p, ¬¬(q ∧ r) ` ¬¬p ∧ r.
Example 2.5
The proof for the sequent (p ∧ q) ∧ r, s ∧ t ` q ∧ r.
Example 2.6
The proof for the sequent p, p → q, p → (q → r) ` r
Modus Tollens
Example 2.7
‘If Abraham Lincoln was Ethiopian, then he was African.
Abraham Lincoln was not African.
Therefore, he was not Ethiopian.
Modus Tollens
Example 2.8
Proof for the sequent p → (q → r), p, ¬r ` ¬q
Modus Tollens
Example 2.9
Combination of MT with ¬¬e or ¬¬i
Exercises
1 p → (p → q), p ` q.
2 q → (p → r), ¬r, q ` ¬p
Example 2.10
Proof using → i
Definition 2.11
Logical formulas φ with valid sequent ` ψ are theorems.
Example 2.12
Theorem whose proof utilises most of the rules introduced so far
Example 2.13
Prove the validity of the sequent p ∧ q → r ` p → (q → r)
Example 2.13
Prove the validity of the sequent p ∧ q → r ` p → (q → r)
Example 2.14
Prove the validity of the ‘converse’ of the previous sequent
p → (q → r) ` p ∧ q → r
Example 2.14
Prove the validity of the ‘converse’ of the previous sequent
p → (q → r) ` p ∧ q → r
Example 2.15
Proof that uses introduction and-elimination rules for conjunction; it
shows the validity of the sequent
Example 2.15
Proof that uses introduction and-elimination rules for conjunction; it
shows the validity of the sequent
Exercises
1 p ` (p → q) → q
2 (p → r) ∧ (q → r) ` p ∧ q → r
1 ¬p → ¬q ` q → p
2 p ∨ q, ¬q ∨ r ` p ∨ r
Remark 2.1
p ∨ q ` q ∨ p is valid.
Examples
Example 2.16
Prove that the sequent q → r ` p ∨ q → p ∨ r is valid
Examples
Example 2.16
Prove that the sequent q → r ` p ∨ q → p ∨ r is valid
Examples
Example 2.17
Prove that the sequent (p ∨ q) ∨ r ` p ∨ (q ∨ r) is valid
Examples
Example 2.17
Prove that the sequent (p ∨ q) ∨ r ` p ∨ (q ∨ r) is valid
Examples
Example 2.18
Prove that the sequent p ∧ (q ∨ r) → (p ∧ q) ∨ (p∧) is valid.
Examples
Example 2.18
Prove that the sequent p ∧ (q ∨ r) → (p ∧ q) ∨ (p∧) is valid.
Examples
Example 2.19
Prove that the sequent ` p → (q → p) is valid.
Examples
Example 2.19
Prove that the sequent ` p → (q → p) is valid.
p ∧ ¬p ` q
Negation-elimination:
Examples
Example 2.21
Show that ¬p ∨ q ` p → q is valid.
Examples
Example 2.21
Show that ¬p ∨ q ` p → q is valid.
Negation-introduction
Negation-introduction:
Examples
Example 2.22
Show that p → q, p → ¬q ` ¬p is valid.
Examples
Example 2.22
Show that p → q, p → ¬q ` ¬p is valid.
Examples
Example 2.23
Show that p → (q → r), p, ¬r ` ¬q is valid.
Examples
Example 2.23
Show that p → (q → r), p, ¬r ` ¬q is valid.
Examples
Example 2.24
Show that p ∧ ¬q → r, ¬r, p ` q is valid.
Examples
Example 2.24
Show that p ∧ ¬q → r, ¬r, p ` q is valid.
Derived Rules
Derived Rules
Derived Rules
Derived Rules
Derived Rules
2 Law of Excluded Middle: (LEM for short, Latin name tertium non
datur or simply no third) φ ∨ ¬φ is true.
2 Law of Excluded Middle: (LEM for short, Latin name tertium non
datur or simply no third) φ ∨ ¬φ is true.
Example: if-statements in programming language
‘if B {C1 } else {C2 }’
2 Law of Excluded Middle: (LEM for short, Latin name tertium non
datur or simply no third) φ ∨ ¬φ is true.
Example: if-statements in programming language
‘if B {C1 } else {C2 }’
Example 2.25
Using LEM, we show that p → q `6= p ∨ q is valid.
Example 2.25
Using LEM, we show that p → q `6= p ∨ q is valid.
Provable Equivalence
Definition 2.26
Let φ and ψ are formulas of propositional logic. We say that φ and ψ are
provably equivalent iff the sequents φ ` ψ and ψ ` φ are valid and we
denote by φ a` ψ.
Provable Equivalence
Definition 2.26
Let φ and ψ are formulas of propositional logic. We say that φ and ψ are
provably equivalent iff the sequents φ ` ψ and ψ ` φ are valid and we
denote by φ a` ψ.
Example 2.27
Examples of provably equivalent formulas are
Extra Reading
Exercises
1 p → (q ∨ r), q → s, r → s ` p → s
2 (p ∧ q) ∨ (p ∧ r) ` p ∧ (q ∨ r)
3 p → q, r → s ` p ∧ r → q ∧ s