Hoofdstuk 10: Predikaatlogica: afleidingen

Download Report

Transcript Hoofdstuk 10: Predikaatlogica: afleidingen

Hoofdstuk 10: Predikaatlogica: afleidingen
L. Storme
Toepassingsgerichte formele logica II
academiejaar 2006-2007
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Afleidingsregels in predikaatlogica
Afleidingsregels in predikaatlogica:
I
Enerzijds afleidingsregels uit propositielogica.
I
Anderzijds afleidingsregels voor ∀ en ∃.
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
∀E-Eliminatieregel: ∀E
∀E-Eliminatieregel: ∀E (regel van instantiatie)
Σ
..
.
..
.
∀x ϕ
——————– ∀E
[t/x]ϕ uit Σ
mits t vrij is voor x in ϕ
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeelden
Correcte toepassing ∀E:
∀x ∃y Rxy
————- ∀E
∃y Rzy
Incorrecte toepassing ∀E: (y niet vrij voor x in ∃y Rxy )
∀x ∃y Rxy
————∃y Ryy
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
∀I-Introductieregel: ∀I
∀I-Introductieregel: ∀I (regel van generalisatie)
Σ
..
.
..
.
ϕ
———————- ∀I
∀x [x/y ]ϕ uit Σ
mits y niet vrij in Σ,
x vrij voor y in ϕ,
en x niet vrij in ∀y ϕ
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
∃I-Introductieregel: ∃I
Σ
..
.
..
.
[t/x]ϕ
—————— ∃I
∃x ϕ uit Σ
mits t vrij is voor x in ϕ
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeelden
Correcte toepassing ∃I:
Ryy
————- ∃I
∃x Ryx
Incorrecte toepassing ∃I: (y niet vrij voor x in ∀y Ryx)
∀y Ryy
————∃x ∀y Ryx
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
∃E-Eliminatieregel: ∃E
Φ
Σ, [y /x]ϕ
..
..
.
.
..
..
.
.
∃x ϕ
ψ
————————————– ∃E, [ − [y /x]ϕ]
ψ uit Φ ∪ Σ
mits y niet vrij in Σ en Ψ,
y vrij voor x in ϕ,
en y niet vrij in ∃x ϕ
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeeld 10.3
∀x (Ax → Bx) ` ∀x Ax → ∀x Bx
1.
2.
3.
4.
5.
6.
7.
∀x (Ax → Bx)
∀x Ax
Ad
Ad → Bd
Bd
∀x Bx
∀x Ax → ∀x Bx
uit
uit
uit
uit
uit
uit
uit
ϕ
ψ
ψ
ϕ
ϕ, ψ
ϕ, ψ
ϕ
L. Storme
aanname ϕ = ∀x (Ax → Bx)
(hulp)aanname ψ = ∀x Ax
∀E(2)
∀E(1)
→E(3,4)
∀I(5), d niet in ∀x Bx, ϕ, ψ
→I(6)
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeeld 10.4
∀x Ax ∨ ∀x Bx ` ∀x (Ax ∨ Bx)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
∀x Ax ∨ ∀x Bx
∀x Ax
Ad
Ad ∨ Bd
∀x (Ax ∨ Bx)
∀x Bx
Bd
Ad ∨ Bd
∀x (Ax ∨ Bx)
∀x (Ax ∨ Bx)
uit
uit
uit
uit
uit
uit
uit
uit
uit
uit
ϕ
ψ
ψ
ψ
ψ
χ
χ
χ
χ
ϕ
L. Storme
aanname ϕ = ∀x Ax ∨ ∀x Bx
(hulp)aanname ψ = ∀x Ax
∀E(2)
∨I(3)
∀I(4), d niet in ∀x (Ax ∨ Bx), ψ
(hulp)aanname χ = ∀x Bx
∀E(6)
∨I(7)
∀I(8), d niet in ∀x (Ax ∨ Bx), χ
∨E(1,5,9)
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeeld 10.4 (tweede afleiding)
∀x Ax ∨ ∀x Bx ` ∀x (Ax ∨ Bx)
1.
2.
3.
4.
5.
6.
7.
8.
9.
∀x Ax ∨ ∀x Bx
∀x Ax
Ad
Ad ∨ Bd
∀x Bx
Bd
Ad ∨ Bd
Ad ∨ Bd
∀x (Ax ∨ Bx)
uit
uit
uit
uit
uit
uit
uit
uit
uit
ϕ
ψ
ψ
ψ
χ
χ
χ
ϕ
ϕ
aanname ϕ = ∀x Ax ∨ ∀x Bx
(hulp)aanname ψ = ∀x Ax
∀E(2)
∨I(3)
(hulp)aanname χ = ∀x Bx
∀E(5)
∨I(6)
∨E(1,4,7)
∀I(8), d niet in ∀x (Ax ∨ Bx), ϕ
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeeld 10.5
∃x (Ax ∧ Bx) ` ∃x Ax ∧ ∃x Bx
1.
2.
3.
4.
5.
6.
7.
8.
∃x (Ax ∧ Bx)
Ad ∧ Bd
Ad
∃x Ax
Bd
∃x Bx
∃x Ax ∧ ∃x Bx
∃x Ax ∧ ∃x Bx
uit
uit
uit
uit
uit
uit
uit
uit
χ
ϕ
ϕ
ϕ
ϕ
ϕ
ϕ
χ
aanname χ = ∃x (Ax ∧ Bx)
(hulp)aanname ϕ = Ad ∧ Bd
∧E(2)
∃I(3)
∧E(2)
∃I(5)
∧I(4,6)
∃E(1,7), d niet in ∃x Ax ∧ ∃x Bx en χ
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeeld 10.7
∃x (Ax ∧ Bx), ¬∃x (Bx ∧ Cx) ` ¬∀x (Ax → Cx)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
∃x (Ax ∧ Bx)
¬∃x (Bx ∧ Cx)
Ad ∧ Bd
∀x (Ax → Cx)
Ad → Cd
Ad
Bd
Cd
Bd ∧ Cd
∃x (Bx ∧ Cx)
¬∀x (Ax → Cx)
¬∀x (Ax → Cx)
uit
uit
uit
uit
uit
uit
uit
uit
uit
uit
uit
uit
ϕ
ψ
ξ
χ
χ
ξ
ξ
χ, ξ
χ, ξ
χ, ξ
ψ, ξ
ϕ, ψ
L. Storme
aanname ϕ = ∃x (Ax ∧ Bx)
aanname ψ = ¬∃x (Bx ∧ Cx)
(hulp)aanname ξ = Ad ∧ Bd
(hulp)aanname χ = ∀x (Ax → Cx)
∀E(4)
∧E(3)
∧E(3)
→E(6,5)
∧I(7,8)
∃I(9)
¬I(2,10)
∃E(1,11),
d niet in ϕ, ψ,¬∀x (Ax → Cx)
Hoofdstuk 10: Predikaatlogica: afleidingen
Voobeeld 10.8
∃x ∀y Rxy ` ∀y ∃x Rxy
1.
2.
3.
4.
5.
6.
∃x ∀y Rxy
∀y Rdy
Rde
∃x Rxe
∃x Rxe
∀y ∃x Rxy
uit
uit
uit
uit
uit
uit
ϕ
ψ
ψ
ψ
ϕ
ϕ
aanname ϕ = ∃x ∀y Rxy
(hulp)aanname ψ = ∀y Rdy
∀E(2)
∃I(3)
∃E(1,4), d niet in ϕ, ∃x Rxe
∀I(5), e niet in ∀y ∃x Rxy , ϕ
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Axioma’s en axiomatiek in propositielogica
Axioma: mag op elk moment in bewijs gebruikt worden.
Axiomatisch systeem of Axiomatiek: verzameling axioma’s en
afleidingsregels.
Voorbeeld: axiomatiek S heeft axioma’s:
I
ϕ → (ψ → ϕ)
I
(ϕ → (ψ → χ)) → ((ϕ → ψ) → (ϕ → χ))
I
(¬ϕ → ¬ψ) → (ψ → ϕ)
en afleidingsregel (Modus Ponens)
I
Uit ϕ en (ϕ → ψ) mogen we ψ afleiden.
Deze axiomatiek is equivalent met de natuurlijke deductie.
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Axiomatisch bewijssysteem in de predikaatlogica
Voor taal met enkel ¬ en →, en enkel kwantor ∀.
(∃x ϕ ↔ ¬∀x (¬ϕ))
Axiomatiek en modus ponens afleidingsregel uit propositielogica
moeten uitgebreid worden met volgende axiomaschema’s voor
kwantoren:
I
(∀x (ϕ → ψ)) → (∀x ϕ → ∀x ψ)
I
ϕ → ∀x ϕ
mits x niet vrij in ϕ
I
∀x ϕ → [t/x]ϕ
mits de term t vrij is voor x in ϕ,
samen met de afleidingsregel
I
Uit ϕ volgt ∀x ϕ (Generalisatie).
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Predikaatlogische theorie¨en
Interessante voorbeelden van theorie¨en gebaseerd op het
bewijssysteem van de predikaatlogica.
Groep G heeft een 2-plaatsige functie +, een 1-plaatsige functie -,
en een bijzondere constante 0, waarvoor de volgende axioma’s
gelden:
I
∀x (x + 0 = x)
∀x (0 + x = x)
I
∀x (x + (−x) = 0)
∀x ((−x) + x = 0)
I
∀x ∀y ∀z ((x + y ) + z = x + (y + z))
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Voorbeelden van groepen
I
Alhoewel N een 2-plaatsige functie +, en een bijzondere
constante 0 heeft, is dit geen model van een groep daar de
1-plaatsige functie - niet gedefinieerd is op N.
I
Daarentegen, Z met de 2-plaatsige functie +, de 1-plaatsige
functie -, en de bijzondere constante 0, is een model van een
groep.
I
Analoog is 2Z, de verzameling van de even gehele getallen,
met de 2-plaatsige functie +, de 1-plaatsige functie -, en de
bijzondere constante 0, een model van een groep.
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Peano-rekenkunde
Theorie om het optellen en vermenigvuldigen van de natuurlijke
getallen op te bouwen:
I
C = {0}: slechts ´e´en constantesymbool: de constante 0
I
F = {S, +, ·}: de opvolgerfunctie S waarbij Sx = x + 1, de
somfunctie +, en de productfunctie ·
Natuurlijke getallen 0, 1, 2, . . . zijn in feite 0, S0, SS0, . . .
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen
Axioma’s voor de Peano-rekenkunde
PA1 ∀x ¬(0 = Sx)
PA2 ∀x ∀y ((Sx = Sy ) → (x = y ))
PA3 ∀x (x + 0 = x)
∀x ∀y ((x + Sy ) = S(x + y ))
PA4 ∀x (x · 0 = 0)
∀x ∀y ((x · Sy ) = x · y + x)
PA5 (([0/x]ϕ ∧ ∀x (ϕ → [Sx/x]ϕ)) → ∀x ϕ) (voor elke formule ϕ)
L. Storme
Hoofdstuk 10: Predikaatlogica: afleidingen