Propositional Logic: Proof Method: Informatics Engineering Study Program
Propositional Logic: Proof Method: Informatics Engineering Study Program
Proof Method
Source: Computational Logic Lecture Notes
Stanford University
2 IF2121/NUM/7Sept2020
Review
Computational Logic
Propositional Logic:
Sintax Simple sentence, Compound Sentence
Semantics interpretation, evaluation, reverse evaluation, types of
compund sentence
Logical Entailment
Semantic Reasoning
33 IF2121/NUM/7Sept2020
Proof Method
Proof of a conclusion from set of premises:
Sequence of sentences terminating in conclusion in which each
item is either a premise, an instance of axiom schema, or the
result of applying a rule of inference to earlier items in
sequence.
Base: Applied Rule of Inference to premises
4 IF2121/NUM/7Sept2020
Proof Method
Proof of a conclusion from set of premises:
Sequence of sentences terminating in conclusion in which
each item is either a premise, an instance of axiom schema,
or the result of applying a rule of inference to earlier items
in sequence.
Base: Applied Rule of Inference to premises
A rule of inference:
a pattern of reasoning consisting of premises and
conclusions.
5 IF2121/NUM/7Sept2020
Proof Method
More rule of inference:
1. Modus ponens 2. Modus tollens
p→q p→q
p ~q
---------------
---------------
∴~p
∴q
3. Disjunctive 4. Simplification
syllogism p∧q
p∨q ---------------
~p ∴p
---------------
6 ∴q IF2121/NUM/7Sept2020
Proof Method
More rule of inference:
5. Addition 6. Conjunction
p p
--------------- q
---------------
∴p∨q
∴p∧q
7. Hypothetical 8. Resolution
syllogism p∨q
pq ~p∨r
qr
---------------
---------------
∴pr ∴q∨r
7 IF2121/NUM/7Sept2020
Rules of Replacement
Associativity disjunction, conjunction, equivalence
Commutativity disjunction, conjunction, equivalence
Distributivity: p ∨ (r ∧ q) ↔ (p ∨ q) ∧ (p ∨ q)
Double Negation: ¬¬p ↔ p
De Morgan’s Law:
¬(p ∧ q) ↔ (¬p) ∨ (¬q)
¬(p ∨ q) ↔ (¬p) ∧ (¬q)
Transposition: (p → q) ↔ (¬q → ¬p)
Material Implication: (p q) ↔ (¬p ∨ q)
Tautology: (p ∧ p) ↔ p or (p ∨ p) ↔ p
8 IF2121/NUM/7Sept2020
Example
Premises:
1. p→q
2. m→p∨q
Conclusion: m→q
{p→q, m→p∨q} |= m→q ?
3. ~ p ∨ q Material Implication 1
4. ~ m ∨ p ∨ q Material Implication 2
5. ~ m ∨ q Resolution 3,4
6. m q Material Implication 5
Jadi dapat dibuktikan {p→q, m→p∨q} |= m→q
9 IF2121/NUM/7Sept2020
Exercise
Premis:
1. Kalau mahasiswa malas belajar dan sering bolos kuliah, mahasiswa
tidak lulus ujian.
2. Kalau mahasiswa tidak lulus ujian, orang tuanya akan marah.
3. Mahasiswa sering bolos kuliah tetapi orang tuanya tidak marah
Kesimpulan:
Mahasiswa tidak malas belajar.
Gunakan proposisi:
malas: Mahasiswa malas belajar ; bolos: Mahasiswa sering bolos kuliah
lulus: Mahasiswa lulus ujian ; marah: Orang tua mahasiswa marah
10 IF2121/NUM/7Sept2020
Proving without premises
No premise no place to apply rules of
inference
Facts: valid sentences true for all interpretations
How to prove p (q p) is a valid sentence?
Requires: rule of inference without premises
Example: axiom schemata
11 IF2121/NUM/7Sept2020
Schemata
Schema: expression satisfying the grammatical rules of our
language occurs meta-variables in the expression
ϕ (ψ ϕ)
Instance of sentence schema: substituting the occurrences of
metavariables, form legal expressions
12 IF2121/NUM/7Sept2020
Axiom
Axiom:
Proposition that is believed to be true
base assumption for proving
valid proposition
Example: p (q p)
13 IF2121/NUM/7Sept2020
Standard Axiom Schemata
Implication Introduction (II):
A→(B→A)
14 IF2121/NUM/7Sept2020
Standard Axiom Schemata (2)
Equivalence (EQ):
(A↔B)→(A→B)
(A↔B)→(B→A)
(A→B)→((B→A)→(A↔B))
Other operators:
(A←B)↔(B→A)
(A ∨ B)↔(~A→B)
(A ∧ B)↔~(~A ∨ ~B)
15 IF2121/NUM/7Sept2020
Proofs
Prove all logical consequences from any set of premises
Standard axiom schemata
Modus Ponen
16 IF2121/NUM/7Sept2020
Example
Whenever p is true, q is true. Whenever q is true, r is
true. Prove that whenever p is true, r is true.
Premis: p→q, q→r
Konklusi: p→r
1. p→q premise
2. q→r premise
3. (q→r)→(p→(q→r)) II
4. (p→(q→r)) Modus Ponen 2,3
5. (p→(q→r))→((p→q)→(p→r)) ID
6. (p→q)→(p→r) Modus Ponen 4,5
7. p→r Modus Ponen 1,6
17 IF2121/NUM/7Sept2020
Exercise Axiom Schemata
1. Premises: p→q, q→r
Prove conclusion: (p→~r)→~p
II: A→(B→A)
ID: A→(B→C) → ((A→B)→(A→C))
CR: (A→~B)→ ((A→B)→~A)
(~A→~B)→ ((~A→B)→A)
EQ: (A↔B)→(A→B)
(A↔B)→(B→A)
(A→B)→((B→A)→(A↔B))
O: (A←B)↔(B→A)
(A ∨ B)↔(~A→B)
(A ∧ B)↔~(~A ∨ ~B)
18 IF2121/NUM/7Sept2020
{p→q, q→r} |= (p→~r)→~p
1. p→q premise
2. q→r premise
3. (q→r)→(p→(q→r)) II
4. (p→(q→r)) Modus Ponen 2,3
5. (p→(q→r))→((p→q)→(p→r)) ID
6. (p→q)→(p→r) Modus Ponen 4,5
7. p→r Modus Ponen 1,6
8. (p→r) →((p→~r)→~p) CR
9. (p→~r)→~p Modus Ponen 7,8
19 IF2121/NUM/7Sept2020
Provability
A├B
A conclusion is said to be provable from a set of premises
(written ├ ) if and only if there is a finite proof of the
conclusion from the premises using only Modus Ponens and
the Standard Axiom Schemata.
Previous Example: {p→q, q→r} ├ (p→r)
(A ├ B) ↔ (A |= B )
20 IF2121/NUM/7Sept2020
Deduction Theorems
A |- (B→C) iff A∪{B} |- C
Example:
{p→q, q→r} |- (p→r)
{p→q, q→r, p} |- r
21 IF2121/NUM/7Sept2020
Review
∆ |= ϕ
Set of premises ∆ logically entails a conclusion ϕ iff every
interpretation that satisfies the premises also satisfies the conclusion
Propositional Logic: Propositional entailment
Semantic reasoning:
Truth table
Validity checking
Unsatisfiability checking
Proof Method:
Rules of Inference
Axiom schemata
22 IF2121/NUM/7Sept2020
Exercise 1
Prove:
{p→q, q→r} |= (q→r)→((p→~r)→~p)
using:
Axiom schemata, Rule of Inference (without Deduction
Theorems)
23 IF2121/NUM/7Sept2020
Exercise 2
1. Sesuatu di laut yang tidak diperhatikan, bukan putri
duyung.
2. Sesuatu di laut yang dicatat pada log, berarti layak untuk
diingat.
3. Sesuatu yang saya lihat di laut, tidak ada yang layak untuk
diingat.
4. Sesuatu yang saya perhatikan di laut, adalah sesuatu yang
saya catat di log.
Buktikan bahwa kesimpulan: “Sesuatu yang saya lihat di
laut, bukanlah putri duyung”, dapat diturunkan dari
kumpulan fakta tersebut dengan memanfaatkan kaidah
inferensi saja.
24 IF2121/NUM/7Sept2020
Exercise 2 (2)
Gunakan proposisi sebagai berikut:
n: sesuatu di laut yang saya (di) perhatikan;
m: putri duyung;
l: sesuatu di laut yang dicatat di log;
r: sesuatu di laut yang layak untuk diingat;
i: sesuatu yang saya lihat di laut.
Nilai:
1. Pengubahan ke kalimat logika proposisi (premis dan
kesimpulan)
2. Pembuktian
25 IF2121/NUM/7Sept2020
Exercise 3
Buktikan bahwa kesimpulan (~r → (~q ∧ ~p)) → ((p →
~r) → ~p) dapat ditarik dari kumpulan fakta {p → q, q →
r} dengan memanfaatkan axiom schema dan modus ponen
saja .
26 IF2121/NUM/7Sept2020
Exercise 4
Misal Γ dan ∆ adalah kumpulan kalimat dalam logika
proposisi, kemudian ψ dan ϕ adalah sebuah kalimat dalam
logika proposisi. Tentukan tiap pernyataan di bawah ini benar
atau salah.
Jika Γ |≠ ψ maka Γ |= ¬ψ.
Jika Γ |= ϕ dan ∆ |= ϕ maka Γ ∪ ∆ |= ϕ.
Jika Γ |= ϕ dan ∆ |= ϕ maka Γ ∩ ∆ |= ϕ.
Jika Γ |= ϕ dan ∆ |≠ ϕ maka Γ ∪ ∆ |= ϕ.
Jika Γ |- ψ maka Γ |= ψ.
Jika Γ ∪ ¬ψ valid, maka Γ |= ψ.
27 IF2121/NUM/7Sept2020
THANK YOU