• Keine Ergebnisse gefunden

Logik f¨ur Informatiker Logic for computer scientists

N/A
N/A
Protected

Academic year: 2022

Aktie "Logik f¨ur Informatiker Logic for computer scientists"

Copied!
26
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Beweismethoden f¨ur Quantoren Weihnachten

Logik f¨ ur Informatiker Logic for computer scientists

Till Mossakowski

Wintersemester 2014/15

Till Mossakowski Logik 1/ 26

(2)

Beweismethoden f¨ ur Quantoren

Till Mossakowski Logik 2/ 26

(3)

Beweismethoden f¨ur Quantoren Weihnachten

Beweismethoden f¨ ur Quantoren

Allbeseitigung

Ausgehend von∀x S(x) kann auf S(c) geschlossen werden, sofernc einen Gegenstand des Gegenstandsbereiches bezeichnet.

Existenzeinf¨uhrung

Ausgehend vonS(c) kann man auf∃x S(x) geschlossen werden, sofernc einen Gegenstand des Gegenstandsbereiches bezeichnet.

Till Mossakowski Logik 3/ 26

(4)

Beispiel

∀x [Cube(x)→Large(x)]

∀x [Large(x)→LeftOf(x,b)]

Cube(d)

∃x [Large(x)∧LeftOf(x,b)]

Till Mossakowski Logik 4/ 26

(5)

Beweismethoden f¨ur Quantoren Weihnachten

Existenzielle Instantiierung (Existenzbeseitigung)

Existenzbeseitigung

Ausgehend von∃x S(x) k¨onnen wir in einem Unterbeweis S(c) annehmen, unter der Bedingung, dassc ein neuer Name ist, der noch nicht verwendet wurde.

Beispiel:

Als Scotland Yard herausfand, dass ein Serienm¨order sein Unwesen trieb, nannten sie ihn“Jack the Ripper”, und man verwendete diesen Namen, um ¨uber ihn ¨Uberlegungen anzustellen. Niemand glaubte, dies bedeute, dass Scotland Yard wusste, wer der M¨order war.

Beachten Sie, dass die Verwendung dieses Namens durch Scotland Yard eine schreiende Ungerechtigkeit gewesen w¨are, falls der Stadtschneider schon Jack the Ripper genannt worden w¨are.

Till Mossakowski Logik 5/ 26

(6)

Beispiel

∀x [Cube(x)→Large(x)]

∀x [Large(x)→LeftOf(x,b)]

∃x Cube(x)

∃x [Large(x)∧LeftOf(x,b)]

Till Mossakowski Logik 6/ 26

(7)

Beweismethoden f¨ur Quantoren Weihnachten

Universelle Generalisierung (Alleinf¨ uhrung)

Alleinf¨uhrung

Wenn wir einen neuen Namenc einf¨uhren, der vorher noch nicht benutzt wurde und dann den SatzS(c) beweisen, k¨onnen wir auf

∀x S(x) schließen.

Beispiel:

Theorem

Jede positive gerade Zahl ist die Summe von zwei ungeraden Zahlen.

Beweis

Es sein eine gerade Zahl mit n>0, d. h.n = 2m mitm>0.

Fallsm ungerade ist, dann giltn=m+m, also die Behauptung.

Fallsm gerade ist, setzen wirn= (m−1) + (m+ 1).

Till Mossakowski Logik 7/ 26

(8)

Beweise mit gemischten Quantoren

∃y [Girl(y)∧ ∀x (Boy(x)→Likes(x,y))]

∀x [Boy(x)→ ∃y (Girl(y)∧Likes(x,y))]

∀x [Boy(x)→ ∃y (Girl(y)∧Likes(x,y))]

∃y [Girl(y)∧ ∀x (Boy(x)→Likes(x,y))]

Till Mossakowski Logik 8/ 26

(9)

Beweismethoden f¨ur Quantoren Weihnachten

Ein (Gegen-)Beispiel

Till Mossakowski Logik 9/ 26

(10)

Allbeseitigung 560 /

Summary of Rules

General Conditional Proof ( ∀ Intro)

c P(c)

.. . Q(c)

. ∀ x (P(x) → Q(x))

Universal Introduction ( ∀ Intro)

c

.. . P(c) . ∀ x P(x)

where c does not occur out- side the subproof where it is introduced.

Allbeseitigung ( ∀ Elim)

∀ x S(x) .. .

. S(c)

Existential Introduction ( ∃ Intro)

S(c) .. . . ∃ x S(x)

Existential Elimination ( ∃ Elim)

∃ x S(x) .. .

c S(c) .. .

Q . Q

where c does not occur out- side the subproof where it is introduced.

Summary of Rules

Till Mossakowski Logik 10/ 26

(11)

Beweismethoden f¨ur Quantoren Weihnachten

Existenzeinf¨ uhrung

560 / Summary of Rules

General Conditional Proof (∀ Intro)

c P(c)

... Q(c)

. ∀x(P(x)→Q(x))

Universal Introduction (∀ Intro)

c

... P(c) . ∀x P(x)

wherecdoes not occur out- side the subproof where it is introduced.

Universal Elimination (∀ Elim)

∀x S(x) ... . S(c)

Existenzeinführung (∃ Intro)

S(c)...

. ∃x S(x)

Existential Elimination (∃ Elim)

∃x S(x) ...

c S(c) ...

Q . Q

wherecdoes not occur out- side the subproof where it is introduced.

Summary of Rules

Till Mossakowski Logik 11/ 26

(12)

Beispiel: ∀ -Elim and ∃ -Intro

∀x [Cube(x)→Large(x)]

∀x [Large(x)→LeftOf(x,b)]

Cube(d)

∃x [Large(x)∧LeftOf(x,b)]

Till Mossakowski Logik 12/ 26

(13)

Beweismethoden f¨ur Quantoren Weihnachten

Existenzbeseitigung

348 /Formal Proofs and Quantifiers

assumption, we can derive some sentence Q not containing the constant c, then we can conclude thatQ follows from the original premises.

Existenzbeseitigung (∃ Elim):

∃x S(x) ...

c S(c) ...

Dabei ist c ein Name, der nicht außerhalb dieses Unterbeweises benutzt wird.

Q

. Q

Again we think of the notation at the beginning of the subproof as the formal counterpart of the English “Letc be an arbitrary individual such thatS(c).”

The rule of existential elimination is quite analogous to the rule of disjunc- tion elimination, both formally and intuitively. With disjunction elimination, comparison with

Elim we have a disjunction and break into cases, one for each disjunct, and estab- lish the same result in each case. With existential elimination, we can think of having one case for each object in the domain of discourse. We are required to show that, whichever object it is that satisfies the conditionS(x), the same result Qcan be obtained. If we can do this, we may concludeQ.

To illustrate the two existential rules, we will give a formal counterpart to the proof given on page 323.

1.∀x[Cube(x)→Large(x)]

2.∀x[Large(x)→LeftOf(x,b)]

3.∃x Cube(x) 4. e Cube(e)

5.Cube(e)→Large(e) ∀ Elim: 1

6.Large(e) → Elim: 5, 4

7.Large(e)→LeftOf(e,c) ∀ Elim: 2

8.LeftOf(e,c) → Elim: 7, 6

9.Large(e)∧LeftOf(e,c) ∧ Intro: 6, 8 10.∃x(Large(x)∧LeftOf(x,b)) ∃ Intro: 9 11.∃x(Large(x)∧LeftOf(x,b)) ∃ Elim: 3, 4-10

Chapter 13

Till Mossakowski Logik 13/ 26

(14)

Beispiel: ∃ -Elim

∀x [Cube(x)→Large(x)]

∀x [Large(x)→LeftOf(x,b)]

∃x Cube(x)

∃x [Large(x)∧LeftOf(x,b)]

Till Mossakowski Logik 14/ 26

(15)

Beweismethoden f¨ur Quantoren Weihnachten

Allgemeiner konditionaler Beweis

Universal quantifier rules/ 343

To remind ourselves of this crucial restriction, we will introduce a new

graphical device, boxing the constant symbol in question and putting it in boxed constant front of the assumption. We will think of the boxed constant as the formal

analog of the English phrase “Letcdenote an arbitrary object satisfyingP(c).”

Allgemeiner konditionaler Beweis (∀ Intro):

c P(c) ...

Dabei ist c ein Name, der nicht außerhalb dieses Unterbeweises benutzt wird.

Q(c)

. ∀x(P(x)→Q(x))

When we give the justification for universal introduction, we will cite the subproof, as we do in the case of conditional introduction. The requirement thatcnot occur outside the subproof in which it is introduced does not pre- clude it occurring within subproofs of that subproof. A sentence in a subproof of a subproof still counts as a sentence of the larger subproof.

As a special case of∀Introwe allow a subproof where there is no sentential assumption at all, just the boxed constant on its own. This corresponds to the method of universal generalization discussed earlier, where one assumes that the constant in question stands for an arbitrary object in the domain of discourse.

Universal Introduction (∀ Intro):

c ...

Where cdoes not occur out- side the subproof where it is introduced.

P(c) . ∀x P(x)

As we have indicated, we don’t really need both forms of∀ Intro. Either form could be eliminated in favor of the other. We use both because the first is more natural while the second is more often used in logic textbooks (and so something to be familiar with if you go on to study more logic).

Section 13.1

Till Mossakowski Logik 15/ 26

(16)

Beipiel: Allgemeiner konditionaler Beweis

∀x [Cube(x)→Large(x)]

∀x [Large(x)→LeftOf(x,b)]

∀x [Cube(x)→LeftOf(x,b)

Till Mossakowski Logik 16/ 26

(17)

Beweismethoden f¨ur Quantoren Weihnachten

Alleinf¨ uhrung

Universal quantifier rules / 343

To remind ourselves of this crucial restriction, we will introduce a new

graphical device, boxing the constant symbol in question and putting it in boxed constant front of the assumption. We will think of the boxed constant as the formal

analog of the English phrase “Letcdenote an arbitrary object satisfyingP(c).”

General Conditional Proof (∀Intro):

c P(c) ...

Where cdoes not occur out- side the subproof where it is introduced.

Q(c)

. ∀x(P(x)→Q(x))

When we give the justification for universal introduction, we will cite the subproof, as we do in the case of conditional introduction. The requirement that cnot occur outside the subproof in which it is introduced does not pre- clude it occurring within subproofs of that subproof. A sentence in a subproof of a subproof still counts as a sentence of the larger subproof.

As a special case of∀Introwe allow a subproof where there is no sentential assumption at all, just the boxed constant on its own. This corresponds to the method of universal generalization discussed earlier, where one assumes that the constant in question stands for an arbitrary object in the domain of discourse.

Alleinführung (∀ Intro):

c ...

Dabei ist c ein Name, der nicht außerhalb dieses Unterbeweises benutzt wird.

P(c) . ∀x P(x)

As we have indicated, we don’t really need both forms of∀ Intro. Either form could be eliminated in favor of the other. We use both because the first is more natural while the second is more often used in logic textbooks (and so something to be familiar with if you go on to study more logic).

Section 13.1

Till Mossakowski Logik 17/ 26

(18)

Pr¨ anexe Normalform (Wiederholung)

∃x Cube(x)→ ∀y Small(y)

∀x∀y (Cube(x)→Small(y))

Till Mossakowski Logik 18/ 26

(19)

Beweismethoden f¨ur Quantoren Weihnachten

Beispiel mit mehrfachen Quantoren

∃y [Girl(y)∧ ∀x (Boy(x)→Likes(x,y))]

∀x [Boy(x)→ ∃y (Girl(y)∧Likes(x,y))]

Till Mossakowski Logik 19/ 26

(20)

Beispiel: de Morgansches Gesetz

¬∀x P(x)

∃x¬P(x)

(Gilt nicht in der intuitionistischen Logik, sondern nur in der klassischen Logik.)

Till Mossakowski Logik 20/ 26

(21)

Beweismethoden f¨ur Quantoren Weihnachten

Weihnachten

Till Mossakowski Logik 21/ 26

(22)

Die Existenz des Weihnachtsmannes

Theorem.Der Weihnachtsmann existiert.

Beweis durch Widerspruch.

Wir nehmen an, der Weihnachtsmann existiert nicht.

Durch∃-Intro existiert etwas, was nicht existiert.

Das ist ein Widerspruch. Folglich ist unsere Annahme, dass der Weihnachtsmann nicht existiert, falsch.

Also existiert der Weihnachtsmann. 2

Till Mossakowski Logik 22/ 26

(23)

Beweismethoden f¨ur Quantoren Weihnachten

Alle Rentiere haben die gleiche Farbe

Theorem.F¨ur allen≥1 habenn Rentiere die gleiche Farbe.

Beweis durch vollst¨andige Induktion.

Induktionsanfang: Ein Rentier hat die gleiche Farbe (offensichtlich).

Induktionsschritt: Wir nehmen an,n beliebige Rentiere haben die gleiche Farbe (Induktionsvoraussetzung), und wir zeigen dass dann n+ 1 beliebige Rentiere die gleiche Farbe haben (Induktions- behauptung).

Es seien alson+ 1 beliebige Rentiere gegeben. Nach Induktions- voraussetzung haben die erstenn Rentiere die gleiche Farbe. Wir entfernen jetzt das letzte Rentier davon und ersetzen es durch das (n+ 1)-ste Rentier. Wiederum nach Induktionsvoraussetzung haben jetzt diesen Rentiere die gleiche Farbe. Also haben alle

n+ 1 Rentiere die gleiche Farbe. 2

Till Mossakowski Logik 23/ 26

(24)

Warum das Datum von Heilig Abend nicht ¨ uberrascht

Sohn:Es ist langweilig, Heilig Abend ist immer am 24. Dezember.

Vater:Ok, in diesem Jahr werden wir Heilig Abend an einem Tag in der Woche vom 23. bis zum 29. Dezember begehen, aber du wirst den genauen Tag nicht vorher kennen.

Sohn:Gut! Dann kann es aber nicht der 29. sein, denn wenn er es w¨are, h¨atten wir Heilig Abend nicht bis zum 28. begangen, also h¨atte ich das Datum vorher gewusst – und das darf nicht sein.

Außerdem kann es auch nicht der 28. sein, da wir dann ja bis zum 27. Heilig Abend noch nicht begangen haben, also h¨atte in diesem Fall ich auch hier das Datum vorher gewusst (den 29. hatten wir ja bereits ausgeschlossen).

Sohn (Fortsetzung):Analog kann es dann auch nicht der 27., nicht der 26., der 25., der 24., der 23. sein. Also kannst du die

Bedingung, ich darf den Tag vorher nicht kennen, nicht erf¨ullen.

Vater:Du wirst sehen, du wirst das Datum vorher nicht kennen.

Till Mossakowski Logik 24/ 26

(25)

Beweismethoden f¨ur Quantoren Weihnachten

Warum das Datum von Heilig Abend ¨ uberraschen kann

Schließlich wurde Heilig Abend am 27. Dezember begangen.

Der Sohn war ziemlich ¨uberrascht.

Till Mossakowski Logik 25/ 26

(26)

Ein Optimierungsproblem

Ein Kamel braucht bis zur n¨achsten Stadt 1000 Meilen quer durch die W¨uste.

Es hat 3000 Bananen zur Verf¨ugung, kann aber nur maximal 1000 Bananen zur gleichen Zeit tragen. Es kann aber auf der Strecke

“Depots” anlegen. F¨ur jede Meile, die das Kamel unterwegs ist, muss es eine Banane essen.

Wie viele Bananen kann es maximal zur Stadt transportieren.

Till Mossakowski Logik 26/ 26

Referenzen

ÄHNLICHE DOKUMENTE

Appendix A.3], briefly recall the notions of a strict monoidal category and their functors [EGNO15, Section 2.8] or [Kock04, Section 3.2], of a symmetric monoidal category, and

Propositional logic First-order logic Tarski’ World General notion Tautology FO validity TW validity Logical Truth.. Tautological FO

As a special case of ∀ Intro we allow a subproof where there is no sentential assumption at all, just the boxed constant on its own.. This corresponds to the method of

Proof: By induction over the derivation, we show that any sentence occurring in a proof is a first-order consequence of the assumption in force in that step. An assumption is in

Kreuzen Sie dieses K¨ astchen an, wenn Sie nicht wollen, dass das Ergebnis Ihrer Klausur mit Ihrer Matrikelnummer im Internet ver¨ offentlicht wird.. Kreuzen Sie dieses K¨ astchen

To this end, it will be important to separate clearly the two aspects of the relativistic challenge referring to these two claims: one should distinguish (1) the question,

We have shown that (i) the prevalence of MRSA is sig- nificantly higher in refugees (REF) (5.6%) than in a com- parison group of resident population not admitted from a

In view of the large amount of US national debt which governments and other non- US entities have bought in the last decade, the question obviously arises as to whether