• Keine Ergebnisse gefunden

The language of PL1

N/A
N/A
Protected

Academic year: 2022

Aktie "The language of PL1"

Copied!
29
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Formal Proofs in Fitch

Logik f¨ ur Informatiker Logic for computer scientists

Till Mossakowski

WiSe 2013/14

(2)

Formal Proofs in Fitch

The language of PL1

(3)

Formal Proofs in Fitch

The language of PL1: individual constants

Individual constants are symbols that denote a person, thing, object

Examples:

Numbers: 0, 1, 2, 3, . . . Names: Max, Claire

Formal constants: a, b, c, d, e, f, n1, n2

Each individual constant must denote an existing object

No individual constant can denote more than one object

An object can have 0, 1, 2, 3 . . . names

(4)

Formal Proofs in Fitch

The language of PL1: predicate symbols

Predicate symbols denote a property of objects, or a relation between objects

Each predicate symbol has an arity that tell us how many objects are related

Examples:

Arity 0: Gate0 is low, A, B, . . .

Arity 1: Cube, Tet, Dodec, Small, Medium, Large

Arity 2: Smaller, Larger, LeftOf, BackOf, SameSize, Adjoins . . .

Arity 3: Between

(5)

Formal Proofs in Fitch

The interpretation of predicate symbols

In Tarski’s world, predicate symbols have a fixed

interpretation, that not always completely coindices with the natural language interpretation

In other PL1 languages, the interpretation of predicate symbols may vary. For example,

may be an ordering of numbers, strings, trees etc.

Usually, the binary symbol = has a fixed interpretation:

equality

(6)

Formal Proofs in Fitch

Atomic sentences

in propositional logic (Boole:)

propositional symbols: Gate0 is low, A, B, C, . . .

in PL1 (Tarski’s world):

application of predicate symbols to constants: Larger(a,b) theorderof arguments matters: Larger(a,b) vs. Larger(b,a) Atomic sentences denotetruth values(true, false)

(7)

Formal Proofs in Fitch

Logical arguments

A (logical) argument states that a sentence, the

conclusion, follows

from other sentences, the

premises.

Examples:

All men are mortal. Socrates is a man.

So,

Socrates is mortal.

Lucretius is a man.

After all,

Lucretius is mortal and all men are mortal.

An argument is valid (or a logical consequence), if truth is

preserved, that is, all circumstances that make the premises true,

also make the conclusion true.

(8)

Formal Proofs in Fitch

Logical consequence

A sentence

B

is a logical consequence of

A1

, . . . ,

An

, if all circumstances that make

A1

, . . . ,

An

true also make

B

true.

In symbols:

A1, . . . ,An|

=

B

.

In this case, it is a valid argument to infer

B

from

A1, . . .An

. If

also

A1, . . .An

are true, then the valid argument is sound.

A1, . . . ,An

are called premises,

B

is called conclusion.

(9)

Formal Proofs in Fitch

Logical consequence — examples

All men are mortal. Socrates is a man. So, Socrates is mortal.

(valid, sound)

All rich actors are good actors. Brad Pitt is a rich actor. So he must be a good actor. (valid, but not sound)

All rich actors are good actors. Brad Pitt is a good actor. So

he must be a rich actor. (not valid)

(10)

Formal Proofs in Fitch

Fitch notation for logical consequence

All men are mortal Socrates is a man So, Socrates is mortal A

1

. . .

A

n

B

Premise

1

. . .

Premise

n

Conclusion

(11)

Formal Proofs in Fitch

Methods for showing (in)validity of arguments

(12)

Formal Proofs in Fitch

Methods for showing (in)validity of arguments

Validity

To show that an argument is valid, we must provide a proof. A proof consists of a sequence of proof steps, each of which must be valid.

In propositional logic, we also can use truth tables to show validity. This is not possible in first-order logic.

Invalidity

An argument can shown to be invalid by finding a

counterexample (model), i.e. a circumstance where

the premises are true, but the conclusion is false.

(13)

Formal Proofs in Fitch

Informal and formal proofs

informal reasoning is used in everyday life

semi-formal reasoning is used in mathematics and theoretical computer science

balance between readability and precision

formal proofs:

follow some specific rule system, and are entirely rigorous

and can be checked by a computer

(14)

Formal Proofs in Fitch

An informal proof

Since Socrates is a man and all men are mortal, it follows that Socrates is mortal.

But all mortals will eventually die, since that is what it means to be mortal.

So Socrates will eventually die.

But we are given that everyone who will eventually die sometimes worries about it.

Hence Socrates sometimes worries about dying.

(15)

Formal Proofs in Fitch

The need for formal proofs

(16)

Formal Proofs in Fitch

A formal proof

1. Cube(c) 2. c = b

3. Cube(b) =Elim: 1,2

(17)

Formal Proofs in Fitch

Four principles for the identity relation

1

=Elim: If

b

=

c, then whatever holds of b

holds of

c

(indiscernibility of identicals).

2

=Intro:

b

=

b

is always true in FOL (reflexivity of identity).

3

Symmetry of Identity: If

b

=

c

, then

c

=

b.

4

Transitivity of Identity: If

a

=

b

and

b

=

c

, then

a

=

c

.

The latter two principles follow from the first two.

(18)

Formal Proofs in Fitch

Transitivity . . .

(19)

Formal Proofs in Fitch

Informal proof of symmetry of identity

Suppose that

a

=

b.

We know that

a

=

a, by the reflexivity of identity.

Now substitute the name

b

for the first use of the name

a

in

a

=

a, using the indiscernibility of identicals.

We come up with

b

=

a, as desired.

(20)

Formal Proofs in Fitch

Formal Proofs in Fitch

(21)

Formal Proofs in Fitch

Formal proofs

P Q R

S

1

Justification 1

. . . . . .

S

n

Justification n

S Justification n+1

(22)

Formal Proofs in Fitch

Formal proof of symmetry of identity

1. a = b

2. a = a =Intro:

3. b = a =Elim: 2,1

(23)

The language of PL1 Formal Proofs in Fitch

Fitch rule: Identity introduction

Notice that on the right of every step below the Fitch bar, we give a

justification of the step. In our deductive system, a justification indicates justification which rule allows us to make the step, and which earlier steps (if any) the rule

is applied to. In giving an actual formal proof, we will number the steps, so we can refer to them in justifying later steps.

We already gave one example of a formal proof in the systemF, back on page 48. For another example, here is a formalization of our informal proof of the symmetry of identity.

1.a=b

2.a=a = Intro

3.b=a = Elim:2, 1

In the right hand margin of this proof you find a justification for each step below the Fitch bar. These are applications of rules we are about to introduce.

The numbers at the right of step 3 show that this step follows from steps 2 and 1 by means of the rule cited.

The first rule we use in the above proof isIdentity Introduction. This = Intro rule allows you to introduce, for any name (or complex term) n in use in

the proof, the assertionn=n. You are allowed to do this at any step in the proof, and need not cite any earlier step as justification. We will abbreviate our statement of this rule in the following way:

Identity Introduction (= Intro):

. n=n

We have used an additional graphical device in stating this rule. This is the symbol .. We will use it in stating rules to indicate which step is being licensed by the rule. In this example there is only one step mentioned in the rule, but in other examples there will be several steps.

The second rule ofF isIdentity Elimination. It tells us that if we have = Elim proven a sentence containing n (which we indicate by writing P(n)) and a

sentence of the form n=m, then we are justified in asserting any sentence which results fromTill MossakowskiP(n) by replacing some or all of the occurrences ofLogic 23/ 29 nbym.

(24)

Formal Proofs in Fitch

Fitch rule: Identity elimination

56 / The Logic of Atomic Sentences

Identity Elimination (= Elim):

P(n)... n=m

... . P(m)

When we apply this rule, it does not matter which ofP(n) andn=moccurs first in the proof, as long as they both appear beforeP(m), the inferred step.

In justifying the step, we cite the name of the rule, followed by the steps in whichP(n) andn=moccur, in that order.

We could also introduce rules justified by the meanings of other predicates besides = into the systemF. For example, we could introduce a formal rule of the following sort:

Bidirectionality of Between:

Between(a,b,c) ...

. Between(a,c,b)

We don’t do this because there are just too many such rules. We could state them for a few predicates, but certainly not all of the predicates you will encounter in first-order languages.

There is one rule that is not technically necessary, but which will make Reiteration

some proofs look more natural. This rule is called Reiteration, and simply allows you to repeat an earlier step, if you so desire.

Reiteration (Reit):

P...

. P

To use the Reiteration rule, just repeat the sentence in question and, on the right, write “Reit:x,” wherexis the number of the earlier occurrence of the sentence.

Till Mossakowski Logic 24/ 29

(25)

The language of PL1 Formal Proofs in Fitch

Fitch rule: Reiteration

Identity Elimination (= Elim):

P(n)... n=m

... . P(m)

When we apply this rule, it does not matter which ofP(n) andn=moccurs first in the proof, as long as they both appear beforeP(m), the inferred step.

In justifying the step, we cite the name of the rule, followed by the steps in whichP(n) andn=moccur, in that order.

We could also introduce rules justified by the meanings of other predicates besides = into the systemF. For example, we could introduce a formal rule of the following sort:

Bidirectionality of Between:

Between(a,b,c) ...

. Between(a,c,b)

We don’t do this because there are just too many such rules. We could state them for a few predicates, but certainly not all of the predicates you will encounter in first-order languages.

There is one rule that is not technically necessary, but which will make Reiteration

some proofs look more natural. This rule is called Reiteration, and simply allows you to repeat an earlier step, if you so desire.

Reiteration (Reit):

P...

. P

To use the Reiteration rule, just repeat the sentence in question and, on the right, write “Reit:x,” wherexis the number of the earlier occurrence of the sentence.

(26)

Formal Proofs in Fitch

Example proof in fitch

SameRow(a, b) b = a

SameRow(b, a)

(27)

Formal Proofs in Fitch

Properties of predicates in Tarski’s world

Larger(a, b) Larger(b, c) Larger(a, c) RightOf(b, c) LeftOf(c, b)

Such arguments can be proved in Fitch using the special rule

Ana Con.

This rule is only valid for reasoning about Tarski’s world!

(28)

Formal Proofs in Fitch

Showing invalidity using counterexamples

Al Gore is a politician

Hardly any politicians are honest Al Gore is dishonest

Imagine a situation where there are 10,000 politicians, and that Al Gore is the only honest one of the lot. In such circumstances both premises would be true but the conclusion would be false.

This demonstrates that the argument is invalid.

(29)

Formal Proofs in Fitch

Are the following arguments valid?

Small(a)

Larger(b, a)

Large(b)

Small(a)

Larger(a, b)

Large(b)

Referenzen

ÄHNLICHE DOKUMENTE

To quantify the eye volume, a package of commercial image processing software (Disect Systems Ltd., UK) was applied to analyse the data received by the detected density

This is in contrast to the epidural use in labour, during which sufentanil in doses up to 30 μg does not influence the condition of the mother or the newborn.” should be deleted

➟ If you can replace a group of words with a pro-form (pronoun, pro-verb, pro-adjective etc.) (keeping the meaning roughly the same) then they form a constituent:.. ➟ I’ve

Methods: A general unknown screening of femoral venous blood and urine using GC-MS was performed to clarify the circumstances of death.. Besides, the 30 cm long hair was cut into

Initially, the group concentrated on three types above all others: IC-IC sentences, which consisted of two independent clauses; IC-DC, where an independent clause was followed by

For the binary liquid systems formic acid + acetic acid, formic acid + propionic acid, and acetic acid + propionic acid, we give the results of new calorimetric measurements of

The empirical part lists the results of the conducted survey regarding the current state of the Montessori schools in the Czech Republic and language education, with special focus

This work has been digitalized and published in 2013 by Verlag Zeitschrift für Naturforschung in cooperation with the Max Planck Society for the Advancement of Science under