truth, deduction, computation; lecture 1

26
Truth, Deduction, Computation Introduction Vlad Patryshev SCU 2013

Upload: vlad-patryshev

Post on 01-Nov-2014

269 views

Category:

Education


0 download

DESCRIPTION

My logic lectures at SCU This one is an introduction

TRANSCRIPT

Page 1: Truth, deduction, computation;   lecture 1

Truth, Deduction, ComputationIntroduction

Vlad PatryshevSCU2013

Page 2: Truth, deduction, computation;   lecture 1

Variety of Interpretations

● different in different cultures○ China○ India○ Greece○ Modern Europe

● depends on where you apply it○ legal○ iq test○ math○ religion○ comp sci

Page 3: Truth, deduction, computation;   lecture 1

Logic in ChinaMo Di (墨子) (468-376 BC) and his school

Three tests for the validity of a doctrine: ancient authority, common observation, and practical effect.

The statement "All statements are mistaken" implies that it is itself mistaken, and one cannot "reject rejection" without refusing to reject one's own rejection.

"The ghost of a man is not a man," but "The ghost of my brother is my brother.""A robber is a man, but abounding in robbers is not abounding in men, nor is being without robbers being without men."

Gōngsūn Lóng (公孫龍) 325–250 BC, School of Names "One and one cannot become two, since neither becomes two."

“A planet can be any size. A planet can be giant or very small. A dwarf planet can only be very small. Therefore, one can say that a dwarf planet is not a planet.”

(But later the only legal logic was Buddhist logic imported from India; later about it)

Page 4: Truth, deduction, computation;   lecture 1

© Copyright 2012 Sanjay Kulkarni

Page 5: Truth, deduction, computation;   lecture 1

Logic in India

● Tetralemma: for a proposition X, there are four possibilities: X; not X; X and not X; not (X or not X)

● Catuṣkoṭi: Positive configuration Negative configuration

P Not (P)

Not-P Not (Not-P)

Both P and Not-P Not (Both P and Not-P)

Neither P nor Not-P Not (Neither P nor Not-P)dharmacakra (धमच )

Page 6: Truth, deduction, computation;   lecture 1

India: Navya-Nyaya School (13th century)

1.Syād-asti — “in some ways it is”2.Syād-nāsti — “in some ways it is not”3.Syād-asti-nāsti — “in some ways it is and it is not”4.Syād-asti-avaktavyaḥ — “in some ways it is and it is indescribable”5.Syād-nāsti-avaktavyaḥ — “in some ways it is not and it is indescribable”6.Syād-asti-nāsti-avaktavyaḥ — “in some ways it is, it is not and it is indescribable”7.Syād-avaktavyaḥ — “in some ways it is indescribable”

Page 7: Truth, deduction, computation;   lecture 1

Logic in India: an Example

Yudhisthira (यु धि ठर)

Yudhisthira never said a lie, and as a reward, his chariot that was not touching the earth (a hovercraft?).

Once Lord Krishna asked him to tell guru Drona about Ashwathama being killed by Bhima. Drona’s son’s name was Ashwathama, but it was an elephant with the same name that Bhima killed.

Yudhisthra said “Ashwathama was killed, a man or an elephant”.

The moment Yudhisthira said the lie, though it was true but not an act of Dharma, his chariot came down.

Page 8: Truth, deduction, computation;   lecture 1

Logic in Greece

Aristotle (Ἀριστοτέλης) 384–322 BCSyllogisms

● Every man is a being therefore:● Every non-being is a non-man● (which is false because the universal

affirmative has existential import, and there are no non-beings)

● A chimera is not a man therefore:● A non-man is not a non-chimera

Page 9: Truth, deduction, computation;   lecture 1

Western Europe, XIX-XX centuries

Georg Cantor, 1845-1918

No matter how correct a mathematical theorem may appear to be, one ought never to be satisfied that there was not something imperfect about it until it also gives the impression of being beautiful.

“In mathematics the art of asking questions is more valuable than solving problems.”

“The essence of mathematics lies in its freedom.”

Page 10: Truth, deduction, computation;   lecture 1

Europe, XX century

David Hilbert, 1862-1943

“No one shall expel us from the paradise that Cantor has created for us.”

Kurt Gödel, 1906-1978

“The more I think about language, the more it amazes me that people ever understand each other at all.”“The brain is a computing machine connected with a spirit.”

Paul Cohen,1934–2007Saul Kripke, b.1940

“Lois Lane believes that Superman can fly, although she does not believe that Clark Kent can fly.”“Londres est joli”

Page 11: Truth, deduction, computation;   lecture 1

Applications: Legal○ Deductive reasoning:

■ “All people sleep, so students must sleep”○ Inductive reasoning:

■ Jane studies every day and is a good student.■ Tom studies every day and is a good student.■ Angela studies every day and is a good student.■ Hence: Good students study every day.

○ Search for Fallacies:■ “Example: “The possession of nuclear weapons is a moral

abomination. Even Edward Teller, the ‘father of the hydrogen bomb,’ urged the United States to halt production once the full extent of their destructive power became known.”

■ Explanation: While it may seem persuasive that even the “father” of the hydrogen bomb disapproved of its development, note that Teller was a physicist, not a cleric or moral philosopher. His views on morality are completely outside his expertise.”

Page 12: Truth, deduction, computation;   lecture 1

Applications: Religion

● Proofs of God’s existence: ○ Deductive

■ God is the greatest conceivable being.■ It is greater to exist than not to exist.■ Therefore, God exists.

○ Karmic: some people in this world are happy, some are in misery - therefore, God exists

● Proofs of God’s nonexistence:○ Deductive

■ Can God create a rock so big that He cannot move it?

○ Inductive ■ A perfect being would have long ago satisfied all its wants and

desires and would no longer be able to take action in the present without proving that it had been unable to achieve its wants faster—showing it imperfect.

Page 13: Truth, deduction, computation;   lecture 1

Applications: IQ Tests○ Correct iq tests

A Division Director scheduled six meetings on Wednesday with his direct reports: Anita, Harold, Ben, Markus, Sheila, and Carol. Each meeting is with only one direct report, and each direct report will meet only once with the Division Director. The Division Director labeled the meeting timeslots in order from 1 through 6, with timeslot 1 occurring first and timeslot 6 occurring last.

Ben's meeting will be immediately after Harold's.Anita's meeting will be two meetings after Markus'.Anita's meeting will be before, but not immediately before, Carol's.

Which direct report is in timeslot 2?Anita? Harold? Ben? Markus? Sheila?

○ Incorrect IQ testsAll cacti are plants; most of the plants are pines; all pines have needles; hence: some cacti have needles. Is it true?

Page 14: Truth, deduction, computation;   lecture 1

Applications: Common Sense

Paradoxes and Fallacies○ Contradiction

■ The sentence below is true.■ The sentence above is false.

○ There is someone in the pub such that, if he is drinking, everyone in the pub is drinking.

○ "the first number not nameable in under ten words"○ Pinocchio paradox: What would happen if Pinocchio

said "My nose will be growing"?

(see also: List of Fallacies on wikipedia)

Page 15: Truth, deduction, computation;   lecture 1

Applications: Common Sense

● Misconceptions○ 2 * 2 = 4○ Every statement is either right or wrong○ Axioms are true, and this is why theorems that follow

from axioms are also true○ Every logic is Boolean or can be expressed in

Boolean○ Boolean logic has only two values○ Programs only deal with finite entities

Page 16: Truth, deduction, computation;   lecture 1

Applications: Electronics

Page 17: Truth, deduction, computation;   lecture 1

Applications: Physics

● Universe is isotropic● Energy conservation law● Sphere surface is proportional to r2

● Therefore: gravity is proportional to 1/r2

Page 18: Truth, deduction, computation;   lecture 1

Applications: Comp Sci

○ Binary logic (used in circuits) and Ternary (Setun, a Russian-made computer)

○ Untyped lambda calculus and typed lambda calculus; Curry-Howard isomorphism

○ Bahrendregdt’s Lambda-cube

○ Logic programming (e.g. Prolog)○ Theorems for Free (Girard-Reynolds): e.g.

if f:A×B -> A for all possible A and B, then f(a,b) == a.

In mathematical logic and type theory, the λ-cube is a framework for exploring the axes of refinement in Coquand's calculus of constructions, starting from the simply typed lambda calculus as the vertex of a cube placed at the origin, and the calculus of constructions (higher order dependently-typed polymorphic lambda calculus) as its diametrically opposite vertex.

Page 19: Truth, deduction, computation;   lecture 1

Set Theory and SQL

select * from users where age < 18;

Page 20: Truth, deduction, computation;   lecture 1

Examples: Two-valued Boolean Logic

& True False

True True False

False False False

| True False

True True True

False True False

!

True False

False True

Page 21: Truth, deduction, computation;   lecture 1

Examples: 8-valued Boolean Logic

^ 0 1 2 3 4 5 6 7

0 0 0 0 0 0 0 0 0

1 0 1 0 1 0 1 0 1

2 0 0 2 2 0 0 2 2

3 0 1 2 3 0 1 2 3

4 0 0 0 0 4 4 4 4

5 0 1 0 1 4 5 4 5

6 0 0 2 2 4 4 6 6

7 0 1 2 3 4 5 6 7

!

0 7

1 6

2 5

3 4

4 3

5 2

6 1

7 0

Page 22: Truth, deduction, computation;   lecture 1

Examples: 3-Valued Kleene Logic

& True Unknown False

True True Unknown False

Unknown Unknown Unknown False

False False False False

| True Unknown False

True True True True

Unknown True Unknown Unknown

False True Unknown False

!

True False

Unknown Unknown

False True

Page 23: Truth, deduction, computation;   lecture 1

Examples: 3-Valued Heyting Logic

& True Unknown False

True True Unknown False

Unknown Unknown Unknown False

False False False False

| True Unknown False

True True True True

Unknown True Unknown Unknown

False True Unknown False

!

True False

Unknown False

False True

Page 24: Truth, deduction, computation;   lecture 1

Other Interesting Logics Systems

● Linear logic: $1 and $1 != $1 (see "Physics, Topology, Logic and Computation: A Rosetta Stone")

● Modal logic● Fuzzy Logic● Temporal logic● Higher order logics

Page 25: Truth, deduction, computation;   lecture 1

The Book

We will use this book.Take it cum grano salis - it was written for a different target audience (see “legal” and “common sense” above.

If you can write code in any programming language, Basic to Agda, you are already way ahead than most of the book’s target audience.