Top Banner
Introduction to Logic: The quest for truth Bernhard Huemer
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Logic for computer_scientists

Introduction to Logic: The quest for truth

Bernhard Huemer

Page 2: Logic for computer_scientists

The Seven Days Of Creation

Computer scientists’ version Mathematicians’ versions

“God threw something together under a 7-day deadline. He’s still

debugging.”

“God laid down axioms, and all else followed trivially.”

Page 3: Logic for computer_scientists

Mathematics at the beginning of the 20th century

Some mathematicians began an ambitious project:

to prove everything.

Page 4: Logic for computer_scientists

Sentiment of the time: Analytical machine

Ada Lovelace

Page 5: Logic for computer_scientists

Russell’s paradox

Suppose there is a town with just one barber, who is male. In this town, every man keeps himself clean-shaven, and he does so by doing exactly one of two things:

• shaving himself; or • being shaved by the barber.

Also, "The barber is a man in town who shaves all those, and only those, men in town who do not shave themselves."

Page 6: Logic for computer_scientists

• “an attempt to describe a set of axioms and inference rules in symbolic logic from which all mathematical truths could in principle be proven”

• Construction of paradoxical sets can be avoided by adding types

Principia Mathematica

Page 7: Logic for computer_scientists

.. but then something happened

Page 8: Logic for computer_scientists

Kurt Gödel• Mathematician from Austria

• 1906 - 1978 († by starvation)

• Completeness theorem

• close friends with Einstein, also published papers on relativity

Page 9: Logic for computer_scientists
Page 10: Logic for computer_scientists

Euclid’s postulates1. A straight line segment can be drawn joining any two points.

2. Any straight line segment can be extended indefinitely in a straight line.

3. Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center.

4. All right angles are congruent.

5. If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect each other on that side if extended far enough.

Page 11: Logic for computer_scientists

• If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect each other on that side if extended far enough.

• Conversely, will these two lines ever cross each other?

Euclid’s parallel postulate

Page 12: Logic for computer_scientists

Hyperbolic / non-euclidean geometry

Page 13: Logic for computer_scientists

Three traditional laws of thought

• The law of identity

• The law of contradiction

• The law of the excluded middle

http://en.wikipedia.org/wiki/Law_of_thought#The_three_traditional_laws

Page 14: Logic for computer_scientists

http://www.thenewsh.com/~newsham/formal/curryhoward/

“Just as there are geometries in which Euclid's fifth postulate is not assumed to be true, there are logic systems in which the double-negation rule is not assumed to be true.”

Page 15: Logic for computer_scientists

Inference rules

Page 16: Logic for computer_scientists

Modus ponens / tollens

If it is raining, the streets are wet. The streets are not wet.

Therefore, it is not raining.

All men are mortal. Socrates is a man.

Therefore, Socrates is mortal.

Page 17: Logic for computer_scientists

• Proving the Law of the excluded middle by contradiction, i.e. assume ¬(p ∨ ¬p) and look for a contradiction

Proving by contradiction

Page 18: Logic for computer_scientists

Example

There exists irrational numbers and such that is rational.x y xy

Page 19: Logic for computer_scientists

is rational

is not rational

Classical proof

22

22

x = 2

y = 2

x = 22

y = 22

2⋅ 2= 2

• Does not tell us which of the two is true .. not particularly useful :(

Page 20: Logic for computer_scientists

Constructive proof

x = 2y = 2 ⋅ log2(3)

Page 21: Logic for computer_scientists

Intuitionistic logic: Definition

Taken from: Lectures on the Curry-Howard Isomorphism, Volume 149 (Studies in Logic and the Foundations of Mathematics)

Page 22: Logic for computer_scientists

Construction rules

Taken from: Lectures on the Curry-Howard Isomorphism, Volume 149 (Studies in Logic and the Foundations of Mathematics)

Page 23: Logic for computer_scientists

Classic tautologies that can be proved constructively

Taken from: Lectures on the Curry-Howard Isomorphism, Volume 149 (Studies in Logic and the Foundations of Mathematics)

Page 24: Logic for computer_scientists

Classical tautologies that aren’t constructive too

Taken from: Lectures on the Curry-Howard Isomorphism, Volume 149 (Studies in Logic and the Foundations of Mathematics)

Page 25: Logic for computer_scientists

Curry-Howard Correspondence

• Direct relationship between computer programs and mathematical proofs

• e.g. tautologies and identity functions ρ → ρ

Page 26: Logic for computer_scientists

Curry-Howard Correspondence

Page 27: Logic for computer_scientists
Page 28: Logic for computer_scientists

Category theory: The rosetta stone

Taken from the paper “Physics, Topology, Logic and Computation: A Rosetta Stone”

Page 29: Logic for computer_scientists

More to come ..

Page 30: Logic for computer_scientists

Hilbert’s Entscheidungsproblem

• 1936 both Alan Turing and Alonzo Church published papers showing that this was impossible

• If the Halting Problem wasn’t in fact a problem, one could theoretically guess the solution for Fermat’s Last Theorem (i.e. mechanization of mathematics)

an + bn = cn

Page 31: Logic for computer_scientists

Q&A

“Either mathematics is too big for the human mind or the human mind is more than

a machine.”

- Kurt Gödel