Logic and Mathematics The Art and Science of Mathematics.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

1 Knowledge Representation Introduction KR and Logic.
Introduction to Proofs
Introduction to Theorem Proving
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Remarks on Mathematical Logic: Paradoxes and Puzzles AAG Selmer Bringsjord The Minds & Machines Laboratory Department of Philosophy, Psychology.
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Truth Trees Intermediate Logic.
CS1001 Lecture 22. Overview Mechanizing Reasoning Mechanizing Reasoning G ö del ’ s Incompleteness Theorem G ö del ’ s Incompleteness Theorem.
Logic and Set Theory.
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Symbolic Logic Foundations: An Overview F03 CSD ProSem Selmer Bringsjord
Math 105: Problem Solving in Mathematics. Course Description This course introduces students to the true nature mathematics, what mathematicians really.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Lecture 24: Gödel’s Proof CS150: Computer Science
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Today’s Topics Using CP and RAA Things to watch for, things to avoid Strategic hints for using CP and RAA A Little Metalogic and some History of Logic.
Computability Thank you for staying close to me!! Learning and thinking More algorithms... computability.
Discrete Mathematics and its Applications
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
Copyright © Cengage Learning. All rights reserved.
Mathematics and the Theory of Knowledge
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Propositional Logic Review
Class 36: Proofs about Unprovability David Evans University of Virginia cs1120.
Propositional Logic.
Logic Introduction to Logic.
David Evans CS200: Computer Science University of Virginia Computer Science Class 24: Gödel’s Theorem.
MATH 224 – Discrete Mathematics
Logic in Computer Science - Overview Sep 1, 2011 POSTECH 박성우.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Proofs1 Elementary Discrete Mathematics Jim Skon.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
Chapter 1 Logic Section 1-1 Statements Open your book to page 1 and read the section titled “To the Student” Now turn to page 3 where we will read the.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Copyright © Curt Hill Mathematical Logic An Introduction.
Course Overview and Road Map Computability and Logic.
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 10 By Herbert I. Gross and Richard A. Medeiros next.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
Great Theoretical Ideas in Computer Science.
Thinking in Methodologies Class Notes. Gödel’s Theorem.
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
Logic UNIT 1.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Incompleteness. System Relativity Soundness and completeness are properties of particular logical systems. There’s no sense to be made of the claim that.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
What is Reasoning  Logical reasoning is the process of drawing conclusions from premises using rules of inference.  These inference rules are results.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Chapter 1 Logic and proofs
Logic and Reasoning.
Lecture 2 Propositional Logic
Symbolic Logic Foundations: An Overview 1/22/01
Lecture 22: Gödel’s Theorem CS200: Computer Science
Foundations of Discrete Mathematics
An example of the “axiomatic approach” from geometry
Presentation transcript:

Logic and Mathematics The Art and Science of Mathematics

The 4 Color Theorem In 1879, Kempe produced a famous proof of the 4 color theorem: any map of countries can be colored in such a way that no 2 bordering countries have the same color, using only 4 colors. In 1890, Heawood showed the proof not to be a proof at all! When is a proof a proof, and when is it not a proof? Logic to the rescue!

Logic Logic is the study of reasoning In particular, logic studies the conditions under which we can say that a piece of reasoning is valid, i.e. that something (the conclusion) can be said to follow from something else (the premises, givens, assumptions).

Deduction and Induction If the conclusion has to be true assuming the truth of the premises, we call the reasoning deductive. If the conclusion is merely more likely to be true than false given the truth of the premises, we call the reasoning inductive. Logic studies both deduction and induction, but does tend to focus on deduction, especially formal logic.

Normative and Descriptive Theories of Reasoning Psychology of reasoning is a scientific study of how humans reason: –What do humans infer from what? –What is the mechanism behind human reasoning? As such, psychologists come up with descriptive theories of reasoning: hypotheses as to how humans reason based on empirical studies. Logicians, however, try to come up with normative theories of reasoning: –What actually follows from what? Question: But if not empirical, what is the basis for such theories? (Human!) reason alone?

Implication and Truth Logic tells us about implication, not truth. Example: “All flurps are toogle, but not all flems are toogle, so not all flems are flurps” is perfectly logical, but tells us nothing about what-is-the- case. One exception: Implication itself can be seen as a kind of (necessary) truth. So, logic can tells us that certain statements of the form “If then ” are necessarily true (i.e. true in all possible worlds), and hence true in our world as well.

Logic and Science Of course, if I do know that my premises are true, then if the reasoning is (deductively) valid I know the conclusion to be true as well. But that’s just science: science combines observation (facts) with logic (reasoning), to get to truth (laws of physics, chemistry, etc). Of course, scientific reasoning is inherently inductive: a finite set of data is always compatible with multiple theories. Hence: scientific theories can change over time.

Logic and Mathematics Most of what I just said for logic is true for mathematics as well! –Scientists use mathematics to help figure out (calculate, compute, etc) what-is-the-case but mathematics alone does not tell us what-is-the-case –Like logic, mathematical theorems are proven from a set of definitions or axioms: if those axioms or definitions don’t apply to our world, then the theorem doesn’t say anything about our world either. –The only thing we can claim to be certain of is a statement of the form “If then ”. –So, theorems like “There is no greatest prime number” are really expressions of “If we define ‘number’ to be..., and ‘prime’ as … and ‘greater than’ as …, then there is no greatest prime number.”

Further Similarities Between Logic and Mathematics Both logic and mathematics have been around for thousands of years Both logic and mathematics study abstractions that can be applied to any subject matter Formal logic is probably best seen as a branch of mathematics Mathematics can be applied to formal logic (mathematical logic) Formal logic can be applied to mathematics (theorem proving)

Formal Logic We can determine that “All flurps are toogle, but not all flems are toogle, so not all flems are flurps” is a valid inference because of the abstract form of the reasoning: “All P’s are Q’s, but not all R’s are Q’s, so not all R’s are P’s”. Formal logic is just that: studying the validity of reasoning by looking at its abstract form: –Just as in mathematics: 1) expressions of abstract symbols are assigned the objects of study, and 2) by manipulating these expressions of abstract symbols, we can figure something out about these objects.

Little History of Formal Logic Formal logic goes back at least to Aristotle, probably earlier In Medieval Times work was being done on categorical syllogisms like the one on previous page (that one would be classified as AOO-2) ‘Modern’ formal logic was developed in mid 19 th century by people like Georges Boole and Augustus DeMorgan. They developed the system of propositional or truth- functional logic. The much more powerful system of first-order logic (or predicate logic or quantificational logic) was completed by the turn of the 20 th century. Many other systems of logic have been developed since; just as with mathematics, different systems have different applications.

Truth-Functional Logic Applies to reasoning dealing with compound sentences built from truth- functional operators like ‘and’, ‘or’, ‘not’, and ‘if … then’. An operator is truth-functional in that the truth-value of a sentence like “P and Q” is a function of the truth-values of the sentences P and Q.

Truth-Tables P PP T T F F P P  Q T T F F Q T FF F F F T T P P  Q T T F T Q T FF T F F T T

De Morgan’s Laws P  ( P  Q) T T F F Q T FF F F F T T T F T T  P   Q T F T F F F T T T F T T ↑ ↑  ( P  Q)  P   Q T T F T F F T F T F T F F F T T F F T F ↑ ↑

Modus Ponens P P  Q T T F T Q T TF F F F T T P P Q Q T T F FF F T T ←

Ladies and Tigers The prisoner is told that if there is a lady in room I, then its sign is true, but if there is a tiger in the room, then its sign is false. For room II, it is exactly the opposite. Sign I says: ‘Both rooms contain ladies’ Sign II says: ‘Both rooms contain ladies’ Question: Which room should the prisoner pick?

Truth-Table Solution L1L1 L1  L2L1  L2 T T F F L2L2 T FF F F F T T T F F FT T F T ← L 1  (L 1  L 2 ) L 2   (L 1  L 2 )

Boolean Algebra Solution L 2   (L 1  L 2 )  (Equivalence) (L 2   (L 1  L 2 )  (  L 2 →  (L 1  L 2 )  (Transposition) (L 2 →  (L 1  L 2 )  (  (L 1  L 2 ) → L 2 )  (Implication) (L 2 →  (L 1  L 2 )  (  (L 1  L 2 )  L 2 )  (Double Neg.) (L 2 →  (L 1  L 2 )  ((L 1  L 2 )  L 2 )  (Subsumption) (L 2 →  (L 1  L 2 )  L 2  (Implication) (  L 2   (L 1  L 2 ))  L 2  (De Morgan) (  L 2  (  L 1   L 2 ))  L 2  (Commutation) (  L 2  (  L 2   L 1 ))  L 2  (Association) ((  L 2   L 2 )   L 1 )  L 2  (Idempotence) (  L 2   L 1 )  L 2  (Distribution) (  L 2  L 2 )  (  L 1  L 2 )  (Contradiction)   (  L 1  L 2 )  (Contradiction)  L 1  L 2

Formal Proof Solution L2L2  L 2  L 1  (L 1  L 2 ) L 2   (L 1  L 2 ) L2L2 L2L2  (L 1  L 2 ) L2L2   (L 1  L 2 ) L1  L2L1  L Assumption 1. Assumption  Elim 2, 4  Intro 3, 5  Intro 4-6  Elim 7  Elim 8  Intro 3, 9  Intro 3-10  Elim 11

The Dreadsbury Mansion Problem Someone who lived at the Dreadsbury Mansion killed Aunt Agatha. Agatha, the butler, and Charlie were the only ones living at the Dreadsbury Mansion. A killer always hates its victim but is never richer than its victim. Whomever aunt Agatha hated, Charlie did not hate. Agatha hated everybody but the butler. The butler hated everybody not richer than aunt Agatha, as well as everyone that aunt Agatha hated. No one who lived at the mansion hated everybody who was living at the mansion. Finally, aunt Agatha was not the butler. Who killed aunt Agatha?

Automated Theorem Proving Formal proofs seem perfect for automation: proofs require tediously many applications of precisely defined rules: just something a computer would be good at! Problem: the rules of logic are like the rules of chess: they tell you what you can do, but not what you must do. In Automated Theorem Proving (a branch of Artificial Intelligence) researchers try and come up with algorithms to create formal proofs (to be exact: they come up with algorithms to check whether some inference is valid or not).

Axiomatization In fact, why not do this: Express basic axioms and definitions about various branches of mathematics in logic, and simply run an ATP to automatically prove all theorems about any branch of mathematics! This ambitious project was called the Hilbert Program, after the mathematician David Hilbert who proposed it at the turn of the 20 th century.

The MetaMath Project Check it out!

Godel’s Incompleteness Result Unfortunately (or fortunately?), the Hilbert Program failed, and necessarily so. In 1931 Kurt Godel proved that the idea couldn’t work for simple arithmetic, let alone all of mathematics. Godel showed that for any finite set of axioms for arithmetic (just dealing with addition and multiplication for natural numbers) there is an arithmetical truth that cannot be derived from those axioms.

Arithmetic is Undecidable In fact, based on computability theory (starting with Turing in 1936) we have excellent reasons to believe that arithmetic is undecidable, i.e. that there is no systematic procedure (computer program) that can decide for any first-order logic arithmetical statement whether it is true or false!

So what does this mean? Well, if one believes that human mathematicians are able to figure out (in principle of course!) all arithmetical truths, then it is false that human information processing can be captured by a computer program. In short, AI is a pipe dream! On the other hand, if you do believe that human thought can be captured by some kind of computer program (as many cognitive scientists believe), then it seems that there will be truths (in simple arithmetic!) that we won’t be able to figure out.

How good are Automated Theorem Provers? Frankly, they stink! In 1956, the Logic Theorist was able to prove theorem 2.16 of Russell and Whitehead’s book Principia Mathematica: (P → Q) → (  Q →  P) given basic axioms about propositional logic 50 years later, the best ATP’s around still can’t prove that P(  ) = {  } given basic set theory axioms Some researchers see this as evidence that human thought cannot be captured through computation, but others say it’s too early to tell. For practical matters though, the best approach would be to combine human intellect with computational effort: Assisted Theorem Proving: the human lays out the ‘proof plan’, and the ATP will fill in the details.

The 4 Color Theorem In fact, this is exactly how the 4 color theorem was finally proven in 1976: Appel and Haken used a computer running for 1200 hours to finally settle this conjecture. Or did they? At first, the proof was regarded with much skepticism, as it wasn’t verifiable by hand in any reasonable manner. In fact, the proof is of course only reliable as far as the computer program was reliable, i.e. did what it was supposed to do. So, you’d need to prove that the computer program was reliable. Also, the program didn’t produce anything that we would recognize as a formal proof. In 2004, Werner and Gonthier produced a proof using Coq, an Automated Theorem Prover, finally producing a ‘proof-like’ object for the 4 color theorem. So, assuming Coq has been verified for working as it should be, that’s it then, right?

Are my Logic Rules Logical? Well, one tiny problem. Suppose I am a real stickler, and challenge the validity of the logical inference rules as defined. In other words, in order for me to accept a formal logic proof of some theorem, I need to be able to accept the validity of the inference rules used in that proof.

Modus Bogus and Hokus Ponens P  Q Q PP Modus BogusHokus Ponens Clearly, Modus Bogus and Hokus Ponens are not acceptable!

But what about Modus Ponens? Earlier I demonstrated the validity of Modus Ponens using a truth table. However, I thus reasoned as follows: If the truth- table of some argument reveals that there is no row where the premises of that argument are true, while its conclusion is false, then that argument is valid. The truth-table for Modus Ponens shows that there is no row where its premises are true and the conclusion is false. Hence, Modus Ponens is valid. But what logic did I just use? Modus Ponens! Hmm…

Interested in Logic? PHIL 2140 – Introduction to Logic (I think a must for all Math majors) PHIL 4XXX – Intermediate Logic (applying logic to mathematics) PHIL 4420 – Computability and Logic (applying mathematics to logic, including a proof of Godel’s incompleteness theorem) Also: PHIL/PSYC 2xxx – Methods of Reasoning (more informal logic and psychology of reasoning; good course to improve your everyday life reasoning skills!)