1 logic what is it?. 2 formal logic is the science of deduction. it aims to provide systematic means...

73
1 Logic What is it?

Upload: sheila-mills

Post on 17-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

1

LogicWhat is it?

Page 2: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

2

• Formal logic is the science of deduction.

• It aims to provide systematic means for telling whether or not given conclusions follow from given premises, i.e., whether arguments are valid or not

Page 3: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

3

A valid argument is one whose conclusion is true in every case in which all its premises are true.

Page 4: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

4

Premise 1: Some cave dwellers use fire.Premise 2: All who use fire have intelligence.

Conclusion: Some cave dwellers have intelligence.

Valid or not?

Valid

Page 5: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

5

P1: All geniuses are illogical.P2: Some politicians are illogical.

Conclusion: Some politicians are geniuses.

Valid or not?

Not valid

Page 6: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

6

P1: If you overslept, you will be late.P2: You aren’t late.

Conclusion: You didn’t oversleep.

IF you oversleep, you will be late AND you are not late THEN you didn’t oversleep.

Page 7: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

7

P1

P2

.

.

.Pn

C

IF P1 and P2 and … Pn THEN C

Page 8: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

8

A valid argument does not say that C is true but that C is true if all the premises are true.

That is, there are NO counterexamples.

P1: Bertil is a professional musician.P2: All professional musicians have pony-tail.

Therefore: Bertil has pony-tail.

Page 9: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

9

PostulatesAxioms

Page 10: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

10

Einstein's Postulates for the Special Theory of Relativity

• The laws of physics are the same in all reference frames.

• The speed of light through a vacuum (300,000,000 m/s) is constant as observed by any observer, moving or stationary.

Page 11: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

11

Euclid's fifth axiom (parallel axiom):

For each point P and each line l, there exists at most one line through P parallel to l.

Page 12: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

12

Different Geometries

• Euclidean: Given a line L and a point P not on L, there is exactly one line passing through P, parallel to L.

• Hyperbolic: Given a line L and a point P not on L, there are at least two lines passing through P, parallel to L.

• Elliptic: Given a line L and a point P not on L, there are no lines passing through P, parallel to L.

Page 13: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

13

Euclidian Elliptic Hyperbolic

Sum of the angles:

180 180 180

Page 14: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

14

Premises/Postulates/Axioms Conclusion

Logic is about how to deduce, on mere form, a valid argument.

Valid is a semantic concept.Deduction is a syntactic concept.

Page 15: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

15

Logic

• Propositional calculus

• Quantification theory (predicate logic)

Page 16: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

16

Proposition

Propositions are expressed, in natural language, in sentences.

It is raining. It is snowing.

Where is Jack? (NOT a proposition)

Propositions are declarative sentences: saying something that is true or false.

Page 17: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

17

More examples:

Napoleon was German.All men are mortal.Tweety is a robin. Oxygen is an element.Jenkins is a bachelor.No bachelor are married.If it is raining then it is it is snowing.It is not raining.It is raining or it is snowingIt is raining and it is snowing.

Page 18: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

18

If A then Bnot AA or BA and B

If it is raining then it is it is snowing.It is not raining.It is raining or it is snowingIt is raining and it is snowing.

Propositional CALCULUS uses variables for propositions and study the form, not the content (semantics), in order to deduce valid conclusions.

Page 19: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

19

Compare with mathematics.

))(( )1( 22 yxyxyx

)715)(715(715 )2( 22

Page 20: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

20

We shall treat propositions as unanalyzed, thus making no attempt to discern their logical structure.

We shall be concerned only with the relations between propositions, and then only insofar as those relations concern truth or falsehood.

Page 21: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

21

OR

Either you wash the car or you cut the grass.

The symbol V (from Latin vel) is used to indicate ‘or’ as in ‘Either A or B’.

V is inclusive.

Page 22: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

22

Exact definition of V.

Lower-case letters ‘p’, ‘q’, ‘r’, etc., are used for propositional variables, just as ‘x’, ‘y’ are numerical variables.

p q p V q

F F FF T TT F TT T T

Page 23: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

23

‘Socrates is alive V Plato is alive’ is false.

‘Socrates is alive V Plato is dead’ is true.

Page 24: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

24

p q p V q

0 0 00 1 11 0 11 1 1

Page 25: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

25

Not:

raining.not isIt

or raining, isit that)case not the is(it :

raining. isIt :

A

A

pp

0 1 1 0

Page 26: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

26

AND: Socrates is alive Plato is alive

qpqp

0 0 00 1 01 0 01 1 1

Page 27: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

27

)( qpqpqqppqp

T T F T F F T T F F F T T F

. . .

Page 28: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

28

An ‘if … then ___’ is called a conditional. The proposition replacing ‘…’ is called the antecedent, and that replacing the ‘___’ is called the consequent.

How is ‘if … then ___’ represented?

‘if it isn’t raining, then he is at game’

antecedent consequent

Page 29: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

29

Truth value for conditionals.

qthenpif

Things that are q

Things that are p

qp

Things that are neither p nor q

Page 30: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

30

Truth Table

qpqp

0 0 10 1 11 0 01 1 1

Page 31: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

31

qp

if p, then q

p only if q

q

p

You have malaria only if you have fever.

Page 32: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

32

Only men are whisky-drinkers.

Only M is W If W then M

Page 33: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

33

Equivalence

qpqp

De Morgan’s laws:

qpqp

qpqp

qp

)(

)(

Page 34: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

34

Tautology is a proposition that is always true.

)( pqp

Contradiction is a proposition that is always false:

Falsum: symbolizes a contradiction

any ,

Page 35: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

35

if is a tautology, then is a contradiction.

if is a contradiction, then is a tautology.

Page 36: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

36

Inference rules

ponens) (modus ,

n eliminatio

negation Double

and on introducti

,,

n eliminatio

,on introducti

and n eliminatio

p

qpp

p

p

qp

q

qp

p

q

qrqprp

qp

qp

q

qp

p

qp

Page 37: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

37

introduction

qp

q

qp

p

and .1

qpqp

.2

Page 38: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

38

I I

E E

pqqppq

pqp

qqp

1 1

1

qpqp

Compare:

Page 39: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

39

I])[(

I )(

E

ppp

pp1

1

2

2

qpqp

Compare:

Page 40: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

40

I )(

I

pqppq

p

qp

q

1

1

Compare

Page 41: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

41

Proof or Deduction

CP,PP n ,...,21

stands for a proof: there is one or more inferences that together lead to C.

Page 42: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

42

I ][)]([

I

E

)( E

E

rqprqprqp

rrq

rqppqp

qqp1

1

12

2

A Proof

Page 43: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

43

Soundness and completeness

A logic is sound if a deduction yields a valid argument.

It is complete if there is a deduction for a valid argument.

Page 44: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

44

Quantification Theory

For all member in a set …

There exist a member in a set …

Page 45: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

45

All teachers are friendly.

For all x (if x is a teacher then x is friendly)

Some teachers are unfriendly

There is (exists) a teacher such that (x is a teacher and x is unfriendly)

Page 46: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

46

All teachers are friendly.

(if x is a teacher then x is friendly)

Some teachers are unfriendly

(x is a teacher and x is unfriendly)

x

x

Page 47: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

47

All teachers are friendly.

Some teachers are unfriendly

friendly) is teacher a is ( xxx

)unfriendly is teacher a is ( xxx

Page 48: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

48

All teachers are friendly.

Some teachers are unfriendly

friendly) is teacher a is ( xxx

friendly)not is teacher a is ( xxx

Page 49: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

49

A predicate is expressed by an incomplete sentence or sentence skeleton containing an open place.

“___ is a man” expresses a predicate.

When we fill the open place with the name of a subject, such as Socrates, the sentence “Socrates is a man” is obtained.

Page 50: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

50

Consider the skeleton “___ loves ___”.

In grammatical terminology, this consists of a transitive verb and two open places, one to be filled by the name of a subject, such as “Jane”, the other of an object, such as “John”.

Binary relation

Page 51: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

51

Another example:

“___ is less than ___”.

“2 is less than 3”.

In mathematical language:

32

Page 52: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

52

)(SocratesMan

),( JohnJaneLoves

ohnJaneLovesJalternatively

Page 53: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

53

“___ is a man”

“___ loves ___”

)(xMan

),( yxLoves

Page 54: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

54

)(xxUnicorn

Existential quantifier

There is something with a particular property.

Page 55: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

55

Universal quantifier

))()(( xMortalxManx

Every man is mortal.

Page 56: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

56

there are right-angled triangles

OR

there is a triangle that is right-angled

OR

there is a triangle with the property of being right-angled.

))()(( xangledrightxtrianglex

Page 57: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

57

All teachers are friendly.

Some teachers are unfriendly

))( )(( xFxTx

))( )(( xFxTx

Page 58: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

58

)))((0( ySxyxx

Combinations of universal and existential quantifiers.

Page 59: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

59

Problems

1. Interpretation

yxySxS )()(

Page 60: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

60

yxySxS )()(

Three different interpretations:

1. S is the “security number of a person”.2. S is the “successor function in arithmetic.3. S is the “DNA sequence of a person”.

Page 61: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

61

2. Difficulties in expressing natural language sentences.

a. All men are mortal.b. Dog is a quadruped.c. Only drunk drivers under eighteen cause bad accident.a. Driving is risky, if you are drunk.

Page 62: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

62

All have the same form:

))()(( xBxAx

Page 63: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

63

All men are mortal.

Dog is a quadruped.

Only drunk drivers under eighteen cause bad accident.

Driving is risky, if you are drunk.

mortal is )(man a is )( xxBxxA

quadruped a is )( dog a is )( xxBxxA

18under driver drunk a is )(

accident bad causes )(

xxB

xxA

risky is drive tofor )( drunk is )( xxBxxA

Page 64: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

64

Al men are not good.

There are no good men.

Not all men are good.

Page 65: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

65

Everything with F has G Nothing with F has G

))()(( xGxFx ))()(( xGxFx

Something with F has G Something with F has not G

))()(( xGxFx ))()(( xGxFx

Page 66: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

66

Negation

)(xxP can be read

‘it is not the case that all x have the property P’

i.e., ‘some x has not property P’

i.e., there exist some x which not has property P

i.e., )(xPx

Page 67: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

67

)()( xPxxxP

‘there is no x with the property P’i.e., all x have the property notP

Page 68: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

68

Interpretation

What does it mean for a quantified expression to be true or false?

Page 69: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

69

)(xxPsays that all element in a particular domain (a nonempty set) have the property P,i.e., all x belongs to the set that is decided by the interpretation of P.

)(xxPsays that in the domain, decided by the interpretation of P, there is at least one element with the property P.

Page 70: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

70

),( yxD

The meaning of D: ‘x has the dog y’Domain: Växjö.

The interpretation of D is the all pairs such that p is the name of a person in Växjö that has a dog with the name d.

dp,

Page 71: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

71

))()(( xBxRx

Let R stands for raven and B for black.

Then the sentence expresses that all ravens are black.

Black animals

Ravens

Animals

Page 72: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

72

))()(( xTxDx

‘There is a dog that is toothless’.

Domain: All animals

If there is a dog that is toothless the sentence is true.

Page 73: 1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow

73

END