15-251 Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity MATH Some Formal Logic (which is really.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Some important properties Lectures of Prof. Doron Peled, Bar Ilan University.
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
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.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9,10,11- Logic; Deduction Theorem 23/1/09 to 30/1/09.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Knowledge Representation & Reasoning.  Introduction How can we formalize our knowledge about the world so that:  We can reason about it?  We can do.
From Chapter 4 Formal Specification using Z David Lightfoot
Computability and Complexity 10-1 Computability and Complexity Andrei Bulatov Gödel’s Incompleteness Theorem.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
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.
Intro to Discrete Structures
Induction and recursion
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Fall 2010 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
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.
Logic CL4 Episode 16 0 The language of CL4 The rules of CL4 CL4 as a conservative extension of classical logic The soundness and completeness of CL4 The.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part A Knowledge Representation and Reasoning.
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Spring 2011 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
0 What logic is or should be Propositions Boolean operations The language of classical propositional logic Interpretation and truth Validity (tautologicity)
Copyright © Curt Hill Mathematical Logic An Introduction.
Copyright © Curt Hill Quantifiers. Copyright © Curt Hill Introduction What we have seen is called propositional logic It includes.
LDK R Logics for Data and Knowledge Representation PL of Classes.
Activity 1-19: The Propositional Calculus
Great Theoretical Ideas in Computer Science.
Theory and Applications
CSE Winter 2008 Introduction to Program Verification January 31 proofs through simplification.
Godel’s proof Danny Brown. Outline of godel’s proof 1.Create a statement that says of itself that it is not provable 2.Show that this statement is provable.
Great Theoretical Ideas in Computer Science.
CS6133 Software Specification and Verification
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 2 CS 1813 – Discrete Mathematics Proofs Propositions and Calculuses.
Specifying Languages Our aim is to be able to specify languages for use in the computer. The sketch of an FSA is easy for us to understand, but difficult.
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
1 Finite Model Theory Lecture 1: Overview and Background.
Incompleteness. System Relativity Soundness and completeness are properties of particular logical systems. There’s no sense to be made of the claim that.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
Chapter 1 Logic and proofs
From Classical Proof Theory to P vs. NP
Gödel's Legacy: The Limits Of Logics
Discrete Mathematics for Computer Science
Lecture 1 – Formal Logic.
Chapter 3 The Real Numbers.
Great Theoretical Ideas in Computer Science
Lecture 2 Propositional Logic
Homework: Friday Read Section 4.1. In particular, you must understand the proofs of Theorems 4.1, 4.2, 4.3, and 4.4, so you can do this homework. Exercises.
Logics for Data and Knowledge Representation
MA/CSSE 474 More Math Review Theory of Computation
Computer Security: Art and Science, 2nd Edition
Great Theoretical Ideas in Computer Science
Presentation transcript:

Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity MATH Some Formal Logic (which is really Math, but has applications in Computer Science) Computability With Alan! (not Turing)

Formal Logic, Why Gödel was Awesome, And Some Harsh Truths Lecture 25 (April 20, 2010) Adam Blank

Announcements You are now breathing manually MOAR. Homework 9 is due THURSDAY. Homework 10 will be out TONIGHT. The last quiz is on Thursday!

Let’s go to First-Order Logic Land I’ve booked us a tour! …But wait… We need to go through Propositional Calculus Pathway

A Logistic System Named “Adam is currently giving a lecture.” A proposition is a statement that has a truth value. “Danny is currently giving a lecture.” “Apples taste good.” Some examples: “Grapes make five.” Some non-examples:

A Logistic System Named Propositional Variables represent propositions. We usually use letters like,, or as propositional variables. p = q = We let bolded (or underlined) letters represent arbitrary propositions. p, q, r “Adam is currently giving a lecture.” “Danny is currently giving a lecture.”

A Logistic System Named Intuitively, lets us represent relations between propositions. p = q = “Adam is currently giving a lecture.” “Danny is currently giving a lecture.” …A quick aside to some notation…

Some Important Notation: Logical Connectives The negation of p Either p, q, or both Both p and q If p, then q p if and only if q BRB: A Logistic System Named

Some Important Notation: Abbreviations We can define all boolean operations in terms of just negation and disjunction. So,, is said to be a complete set of logical connectives. BRB: A Logistic System Named

A Logistic System Named Intuitively, lets us represent relations between propositions. p = q = “Adam is currently giving a lecture.” “Danny is currently giving a lecture.”

A Logistic System Named Let’s formally define. is a language. So, it has syntax and semantics. These are DISTINCT! First, we define the syntax. Primitive Symbols of :

A Logistic System Named Syntax of. Primitive Symbols of : A formula is a finite string of primitive symbols. Some Examples: A well-formed formula or wff is a formula that can be formed using the following three “formation rules”: (1) A propositional variable p is a wff. (We let capital bold letters stand for arbitrary wffs.) (2) If is a wff, then is a wff. (3) If and are wffs, then is a wff.

A Logistic System Named Well-Formed Formulae of : (1) A propositional variable p is a wff. (2) If is a wff, then is a wff. (3) If and are wffs, then is a wff. Let’s again take a step back and talk more generally…

BRB: A Logistic System Named Axioms, Provability, and Theorems Let’s look at an arbitrary axiomatic system. The system is characterized completely by the set of axioms and the set of inference rules that we take. An axiom is a wff that we take to be immediately provable in.

BRB: A Logistic System Named Axioms, Provability, and Theorems Let’s look at an arbitrary axiomatic system. The system is characterized completely by the set of axioms and the set of inference rules that we take. An inference rule is a way to prove new theorems using known theorems.

Formulae BRB: A Logistic System Named Axioms, Provability, and Theorems How about a picture of ? Well-Formed Formulae Theorems Axioms Inference Rules

A Logistic System Named Well-Formed Formulae of : (1) A propositional variable p is a wff. (2) If is a wff, then is a wff. (3) If and are wffs, then is a wff. Inference Rules of : (MP) From and, infer. Axiom Schemata of : (Ax1) (Ax2) (Ax3)

A Logistic System Named (Ax1) (Ax2) (Ax3) (MP) From and, infer. Let’s prove something in ! Ax3 Ax1 MP: 4,5 Ax2 MP: 6,7

A Fundamental Theorem About Theorems Principle of Induction on Proofs Let be a property. 1) is true of all axioms of a system 2) is “preserved” by all inference rules of the same system Then is true of all theorems of that system If (The proof goes by strong induction on the proof of an arbitrary theorem in the logistic system, but is omitted for brevity.)

An Example of Induction on Proofs using (Ax1) (Ax2) (Ax3) (MP) From and, infer. (Principle of Induction on Proofs) Induction Step: (MP) Claim: All theorems have matched braces Base Cases: (Ax1) (Ax2) (Ax3) Proof: By Induction on Proofs

Semantics of Logistic Systems Up until now, we’ve been building up the tools and resources necessary to describe the syntax of a logistic system… But what about the semantics? Consistency Soundness Completeness

Semantics of Logistic Systems Consistency Soundness Completeness There are many “types” of consistency. These “types” of consistency are properties that a logistic system can have. Absolute Consistency means that not all wffs are provable in the logistic system. Consistency with Respect to Negation means that it is not the case that any wff and its negation are both provable in the logistic system.

Semantics of Logistic Systems Consistency Soundness Completeness A logistic system is sound if all provable wffs (that is, all theorems) are “true.” Absolute Consistency means that not all wffs are provable in the logistic system.

Semantics of Logistic Systems Consistency Soundness Completeness A logistic system is complete if all “true” wffs are provable (that is, are theorems). Notice that if a system is both sound and complete, then “truth” and “provability” are THE SAME THING! A logistic system is sound if all provable wffs (that is, all theorems) are “true.” Absolute Consistency means that not all wffs are provable in the logistic system.

Truth in Well-Formed Formulae of : (1) A propositional variable p is a wff. (2) If is a wff, then is a wff. (3) If and are wffs, then is a wff. A wff is a tautology if and only if it is true regardless of the assignment given to its propositional variables. We reason about the “truth” of wffs using the concept of assignments. An assignment gives a truth value to every propositional variable in the wff. is true if and only if is not true. is true if and only if either is true or is true.

Soundness of (Ax1) (Ax2) (Ax3) (MP) From and, infer. (Principle of Induction on Proofs) Induction Step: (MP) Claim: All theorems of are tautologies Base Cases: (Ax1) (Ax2) (Ax3) Proof: By Induction on Proofs

Consistency of Theorem: All theorems of are tautologies. Claim: is consistent with respect to negation. Claim: is absolutely consistent. Proof: This follows from the above. Let be an arbitrary theorem of. Then, by the soundness theorem, it is a tautology. Observe that is false, regardless of the assignment to propositional variables. Then, it is clearly not a tautology. Proof:

Completeness of Recall that completeness means that every “true” statement is provable. For, that is the same as saying all tautologies are provable. The proof of completeness is not much harder, but is left as an exercise to the audience.

Are we there yet? What happened to us?? A small extension to irst order logic

Well-Formed Formulae of : (1) A propositional variable p is a wff. (2) If is a wff, then is a wff. (3) If and are wffs, then is a wff. Inference Rules of : (MP) From and, infer. Axiom Schemata of : (Ax1) (Ax2) (Ax3) Remember ? is what results if we add quantifiers and individuals. Axioms for quantifiers Inference Rule for Generalization with Quantifiers

Yay! First-Order Logic! What happens if we specify the individuals to be natural numbers?!?!?! Then we get ARITHMETIC! OH NO!!! Not Arithmetic!!! AHHHHHH!!!!!

Let’s start Al Over Again Primitive Symbols of : Abbreviations (and definitions):

Define S(n) to be the function that takes a natural and outputs its encoding in. S(5) = 0’’’’’ We have to define the behavior of the primitive functions addition, multiplication, exponentiation. This is another inductive definition. It is omitted for brevity. Primitive Functions in

Formulae in Terms of : (1) Variables and Numerals are terms. (2) If is a term, then is a term. (3) If and are terms: Then is a term, And is a term, And is a term. Well-Formed Formulae of : (1) If and are terms, then is a wff. (2) If and are wffs: Then is a wff, And is a wff, And for each variable, is a wff.

is true if and only if is not true. is true if and only if either is true or is true. Truth in is true if and only if and refer to the same natural number. is true if and only if for every number, replacing all occurrences of “belonging” to the quantifier with results in a true sentence. Well-Formed Formulae of : (1) If and are terms, then is a wff. (2) If and are wffs: Then is a wff, And is a wff, And for each variable, is a wff.

Axioms of Axiom Schemata of : (Ax1) (Ax2) (Ax3) Axioms for quantifiers Axioms for Equality Peano Axiomatization Axioms for Natural Numbers 1) 0 is a natural 2) n’ is a natural 3) 0 is not the successor of any natural 4) … Axioms for Induction Robinson Axiomatization

The First of Several Inconvenient Truths Godel’s First Incompleteness Theorem: No recursively enumerable system capable of expressing arithmetic can be both consistent and complete. We will prove the slightly weaker statement: with appropriate axiom schemata and inference rules cannot be consistent and complete.

The First of Several Inconvenient Truths Godel’s First Incompleteness Theorem: No recursively enumerable system capable of expressing arithmetic can be both consistent and complete. The Plan: 1) Express “provability” using arithmetic operations 2) Create a “self-referential” sentence that describes its own non-provability

Gödel Numbering F The output of the function G is called a Gödel Numbering of the syntax of our system. Note that since we have 10 symbols, we can just concatenate the individual symbol numbers together to form the Gödel Number for a formula.

Arithmetization of Provability Part of the concept of provability is the axioms of the system. Rather than explicitly choose axioms, we assume that they have been arithmetized into a wff A(x), where A(x) is true iff x is the Gödel Number of an axiom. Ultimately, we want a wff: To get there, we formally define tuples using the # character. Given that we have tuples (and wffs to check if a tuple contains something), we can define Gödel Numbers of proofs! To give an idea of what it is like, here is the arithmetization of a really primitive idea, “a string y ends in x”:

Diagonal Lemma Let X(a) be a wff with exactly one variable not bound by a quantifier. Claim: There exists a sentence Q, such that is provable. Let Go by cases. Case 1: Assume Q; substitute G(TS(G(T))) for y. Case 2: Assume T(S(G(T)))

“yields falsehood when appended to its own quotation” yields falsehood when appended to its own quotation Now we’re ready to prove the first incompleteness theorem! We have: 1) An arithmetization of the concept of provability in the form of a wff P(g) 2) We know that there exists a sentence Q such that is provable. Let’s let X be. Now we know that there is a sentence Q, such that is provable. That is…there is a sentence that is true if and only if its Gödel Number is not provable…

“yields falsehood when appended to its own quotation” yields falsehood when appended to its own quotation Let’s let X be. Now we know that there is a sentence Q, such that is provable. But wait! If Q isn’t provable (which we just showed), then it’s true! Suppose Q were provable. Then, P(G(Q)) would be provable, because a proof definitely exists. But Q is true iff G(Q) is not provable. This is a contradiction. Now suppose Q were not provable. Then, P(G(Q)) would not be provable, because a proof definitely doesn’t exist. But Q is false iff G(Q) is provable. This is a contradiction. This is going to be a contradiction proof. Assume for the sake of contradiction that is both consistent and complete.

MORE Inconvenient Truths Godel’s FIRST Incompleteness Theorem: No recursively enumerable system capable of expressing arithmetic can be both consistent and complete. Godel’s SECOND Incompleteness Theorem: No recursively enumerable system capable of expressing arithmetic can prove its own consistency…and remain consistent.

MORE Inconvenient Truths Continuum Hypothesis Graph Minor Theorem

Another Type of Logic Intuitionistic Logic (also called Constructive Logic) is another type of logic that focuses on inference rules and does not take any axioms. In Classical Logic, which is what we’ve been discussing, the goal is to formalize theories. In Intuitionistic Logic, theorems are viewed as programs. They give explicit evidence that a claim is true.

Another Type of Logic Intuitionistic Logic (also called Constructive Logic) is another type of logic that focuses on inference rules and does not take any axioms. This means that there is no concept of “Proof by Contradiction.” Remember the theorem we proved in ? This is explicitly NOT a theorem in intuitionistic logics. Other than this theorem (and logically equivalent theorems, the two types of logics are identical.

Here’s What You Need to Know… Formal Logic / Gödel’s Theorems Basic Propositional Calculus What consistency means What soundness means What completeness means Gödel's Incompleteness Theorems