PTI 206 Logika

advertisement
PTI 206 Logika
Semester I 2007/2008
Ratna Wardani
1
Deduksi
z Definisi:
s :≡ Socrates (filsuf Yunani kuno);
H(x) :≡ “x is human”;
M(x) :≡ “x mortal”.
z Premis:
H(s)
Socrates manusia.
∀x( H(x)→M(x)) Semua manusia pasti mati.
2
Deduksi
Kesimpulan valid yang dapat diambil:
z H(s)→M(s)
z
z
z
z
z
z
[Instantiate universal.]
If Socrates is human then he is mortal.
¬H(s) ∨ M(s)
Socrates is inhuman or mortal.
H(s) ∧ (¬H(s) ∨ M(s))
Socrates is human, and also either
inhuman or mortal.
(H(s) ∧ ¬H(s)) ∨ (H(s) ∧ M(s)) [Apply distributive law.]
F ∨ (H(s) ∧ M(s))
[Trivial contradiction.]
H(s) ∧ M(s)
[Use identity law.]
M(s)
Socrates is mortal.
3
Contoh Lain
z Definisi:
H(x) :≡ “x is human”;
M(x) :≡ “x is mortal”;
G(x) :≡ “x is a god”
z Premis:
{∀x (H(x) → M(x))
(“Humans are mortal”) and
{∀x( G(x) → ¬M(x)) (“Gods are immortal”).
z Buktikan ¬∃x (H(x) ∧ G(x))
(“No human is a god.”)
4
Derivasi
z∀x (H(x)→M(x)) and (∀x G(x)→¬M(x).)
z∀x (¬M(x)→¬H(x)) [Contrapositive.]
z∀x ([G(x)→¬M(x)] ∧ [¬M(x)→¬H(x)])
z∀x (G(x)→¬H(x))
[Transitivity of →.]
z∀x (¬G(x) ∨ ¬H(x)) [Definition of →.]
z∀x (¬(G(x) ∧ H(x))) [DeMorgan’s law.]
z¬∃x (G(x) ∧ H(x)) [An equivalence law.]
5
Derivasi
z Universal Instantiation (UI)
{ Aturan bagaimana ∀ dieliminasi dg operasi Instansiasi
∀x( A)
S tx ( A)
{ Ex. 1
(
)
∀x f ( x ) = x − 2 ⇒ S
3
x
4
( f (4) = 4
3
)
− 2 = 62
{ Ex.2
∀x (cat(x) ⇒ hastail(x))
cat(Tom) ⇒ hastail(Tom)
6
Derivasi
z Derivasi dg Universal Instantiation (UI)
zEx.
H(x) :≡ “x is human”;
M(x) :≡ “x mortal”.
S :≡ Socrates (filsuf Yunani kuno);
Prove : ∀x (H(x) ⇒ M(x)), H(S) ├ M(S)
zDerivation
1. ∀x (H(x) ⇒ M(x))
premise
2. H(S)
premise
3. (H(S) ⇒ M(S)
SxS
4. M(S)
2,3 MP
all humans are mortal
Socrates is human
If Socrates is human, he is mortal
Socrates is mortal
7
Derivasi
z Derivasi dg Universal Instantiation (UI)
zEx.
f(x,y) :≡ “x is the father of y”;
s(x,y) :≡ “x is the son of y”.
d(x,y) :≡ “x is the daughter of y”.
D :≡ Daug; P :≡ Paul
Prove : ∀x (f(D,x) ⇒ s(x,D) ∨ d(x,D)), f(D,P), ¬d(P,D) ├ s(P,D)
zDerivation
1. ∀x (f(D,x) ⇒ s(x,D) ∨ d(x,D)) premise
2. f(D,P)
premise
3. ¬d(P,D)
premise
4. f(D,P) ⇒ s(P,D) ∨ d(P,D)
SxS
5. s(P,D) ∨ d(P,D)
2,4 MP
6. s(P,D)
3,5 DS
8
Derivasi
z Universal Generalization (UG)
{ Aturan bagaimana ∀ digeneralisasi :Statement yg berlaku lokal
menjadi statement yg berlaku global
A
∀x( A)
{ Ex. 2
∀x (P(x))
∀x (P(x) ⇒ Q(Tom)
∀x (Q(x))
P(x) :≡ ‘x mhs TI’;
Q(x) :≡ ‘x menyukai programming’
9
Derivasi
z Derivasi dg Universal Generalization (UG)
zProve : ∀x P(x), ∀x (P(x) ⇒ Q(x)) ├ ∀x Q(x)
zDerivation
1. ∀x P(x)
premise
2. ∀x (P(x) ⇒ Q(x))
premise
3. P(x)
1, Sxx UI
4. P(x) ⇒ Q(x)
2, Sxx UI
5. Q(x)
3,4 MP
6. ∀x Q(x)
5 UG
zProve : ∀x ∀yP(x,y) ├
zProve : ∀x P(x) ├
∀y ∀xP(x,y)
∀y P(y)
10
Derivasi
z Existential Generalization (EG)
{ Aturan bagaimana ∃ digeneralisasi
S tx ( A)
∃x( A)
{ Ex. 1
C :≡ ‘bibi Cordelia’;
P(x) :≡ ‘x berumur lebih dari 100 tahun’;
P(C )
∃xP( x )
{ Ex.2
Setiap orang yang menang 1 milyar pasti kaya
Mary menang 1 milyar
Ada orang yang kaya
11
Derivasi
z Derivasi dg Existential Generalization (EG)
zEx.
W(x) :≡ “x memenangkan 1 milyar”;
R(x) :≡ “x orang yang kaya”.
M :≡ “Mary”;
Prove : ∀x (W(x) ⇒ R(x)), W(M) ├ ∃xR(x)
zDerivation
1. ∀x (W(x) ⇒ R(x))
premise
2. (W(M) ⇒ R(M)
1, SxM
3. W(M)
premise
4. R(M)
2,3 MP
5. ∃xR(x)
4 EG
12
Derivasi
z Existential Instantiation (EI)
{ Aturan bagaimana ∃ dieliminasi
∃x( A)
S tx ( A)
{ Ex. 1
P(x) :≡ ‘x does somersaults’;
∃xP(x) :≡ ‘somebody makes somersaults’;
S tx P(x ) = P(t )
{ Ex.2
Seseorang menang 1 milyar
Setiap orang yg memiliki 1 milyar pasti kaya
Ada seseorang yang kaya
13
Derivasi
z Derivasi dg Existential Instantiation (EI)
zEx.
W(x) :≡ “x memenangkan 1 milyar”;
R(x) :≡ “x orang yang kaya”.
b :≡ “x”
Prove : ∀x (W(x) ⇒ R(x)), ∃x W(x) ├ ∃xR(x)
zDerivation
1. ∃x W(x)
premise
2. W(b)
1, EI
3. ∀x (W(x) ⇒ R(x))
premise
4. W(b) ⇒ R(b)
3, Sxb
5. R(b)
2,4 MP
6. ∃xR(x)
4, EG
14
Download