Computation Club: Gödel s theorem

Size: px
Start display at page:

Download "Computation Club: Gödel s theorem"

Transcription

1 Computation Club: Gödel s theorem The big picture mathematicians do a lot of reasoning and write a lot of proofs formal systems try to capture the ideas of reasoning and proof in a purely mechanical set of rules that operate on strings we would like to have a formal system that can reason about any mathematical idea, and is always able to prove it if it s true but Kurt Gödel discovered that this is impossible, even if we restrict ourselves to very simple mathematical ideas The main pieces This chapter is about formal systems, which are a way of generating strings. A formal system consists of: a syntax for the strings it can generate ( formulas ); some rules for generating new strings from old ones; and some built in strings to get us started ( axioms ). We normally have a way of interpreting the meaning of a string generated by a formal system. Without an interpretation, a string is just a meaningless sequence of symbols. Some formal systems are complete : for every string with a true meaning, there is always some way of generating that string by starting with the built in strings and repeatedly applying the rules ( every true formula can be proved mechanically ). Vice versa is called sound. In 1900, David Hilbert asked: How do we design a complete formal system for all of mathematics? That is: what are the syntax, rules and built in strings of a system that can generate all true mathematical statements? For philosophical reasons, most people assumed that this formal system was complicated but feasible. In 1936, Kurt Gödel answered: If we did design a formal system for all of mathematics, is it even possible for it to be complete? No. If instead we designed a much simpler formal system for very basic arithmetic, is it possible for that to be complete? No. This was very upsetting.

2 Previously on Computation Club: Predicate calculus In Chapter 58 we learned about the predicate calculus, which is one kind of formal system. Syntax Terms : constants, variables, functions on terms Formulas : predicates on terms ( atomic formula ), ( and ), ( or ), ( implies ), ( not ), ( for all ), ( there exists ) Semantics The logical connectives (,,, ) have a built in meaning (standard truth tables) The quantifiers (, ) have a built in meaning too The other symbols don t mean anything by themselves e.g. we can t say whether the formula x( y(p(x, f(y)))) is true or false, because it depends what P and f mean We need an interpretation to give meaning to the predicates and functions interpretation = a universe of values + an interpretation function the interpretation function maps predicates onto relations (i.e. boolean valued functions) on U, functions onto functions in U > U think of the interpretation function as the method definitions for the predicate and function names: each predicate is implemented as a method that returns booleans, each function is implemented as a method that returns values Previously on Computation Club: river puzzle In Chapter 58, we saw how to use the predicate calculus to build a formal system for reasoning about a puzzle: a man transferring a wolf, a goat and a cabbage across a river. The syntax for this formal system is given by the predicate calculus description above. The predicates are E(x, y), which means equals, and P(m, w, g, c), which means that the m an, the w olf, the g oat and the c abbage can safely reach a particular configuration (with the symbol 0 representing the near side of the river, and the symbol 1 representing the far side). The only function is f, which represents crossing the river; our interpretation says that f(0) = 1 and f(1) = 0. The built in strings ( axioms ) for this formal system are: 1. E(x, x) x equals x 2. E(x, f(x)) x does not equal f(x)

3 3. P(x, x, y, z) E(y, z) P(f(x), f(x), y, z) if goat opposite cabbage, man & wolf cross 4. P(x, y, x, z) P(f(x), y, f(x), z) man & goat cross 5. P(x, y, z, x) E(y, z) P(f(x), y, z, f(x)) if wolf opposite goat, man & cabbage cross 6. P(x, y, x, y) E(x, y) P(f(x), y, x, y) if man & goat opposite wolf & cabbage, man cross 7. P(0, 0, 0, 0) everything on the near bank The rules for this formal system are traditional rules of logic: De Morgan s laws, implication introduction/elimination, Skolemization, substitution, resolution. These can all be written as mechanical rules about symbol manipulation; for example, De Morgan s laws for and : 1. if we ve generated ( X Y ), then we can also generate ( X Y ) 2. if we ve generated ( X ~ Y ), then we can also generate ( X Y ) 3. if we ve generated ( X Y ), then we can also generate ( X Y ) 4. if we ve generated ( X Y ), then we can also generate ( X Y ) By applying all of these rules mechanically in our meeting, we managed to generate these strings: P(1, 0, 1, 0) man and goat on the far bank P(0, 0, 1, 0) goat on the far bank These strings tell us that it s possible for the man to cross the river with the goat and then come back again. If we d carried on, we d eventually have generated P(1, 1, 1, 1), and shown that it was possible for the man to get to the other side with all of the objects. This formal system is both complete and sound : it can generate every true string, and all the strings it generates are true. That means it can generate every possible arrangement of objects where the goat and cabbage are safe, and all the arrangements it generates are possible and keep the goat and cabbage safe. Basic arithmetic The formal system used in the river puzzle is not powerful enough to do arithmetic: it has no representation of numbers (the 0 and 1 are really just near and far ) or operations on them. By choosing a different set of built in strings and rules, we can perform operations like add two numbers together or multiply two numbers together instead of carry a cabbage across the river. A formal system for doing mathematics needs one set of built in strings to represent logical reasoning, and another set to represent numbers. It has rules that support implication and induction. (See the chapter for all of these.)

4 The details aren t important. What matters is that we can use these built in strings and rules to generate new strings that represent true statements about numbers. For example, we can use them to generate the new string s0 + s0 = ss0 (i.e. prove that = 2): 1. axiom: x( y(x + sy = s(x + y))) 2. axiom: x(f(x)) F(y), if y is not quantified when substituted 3. from 1 and 2: x( y(x + sy = s(x + y))) y(s0 + sy = s(s0 + y)) taking F(x) to be y(x + sy = s(x + y)) substituting s0 for x 4. rule: if we ve generated F and F G, then we can also generate G 5. from 1, 3, 4: y(s0 + sy = s(s0 + y)) taking F to be x( y(x + sy = s(x + y))) taking G to be y(s0 + sy = s(s0 + y)) 6. from 5 and 2: y(s0 + sy = s(s0 + y)) s0 + s0 = s(s0 + 0) taking F(x) to be y(s0 + sy = s(s0 + y)) substituting 0 for x 7. from 5, 6, 4: s0 + s0 = s(s0 + 0) taking F to be y(s0 + sy = s(s0 + y)) taking G to be s0 + s0 = s(s0 + 0) 8. axiom: x(x + 0 = x) 9. from 8 and 2: x(x + 0 = x) s0 + 0 = s0 taking F(x) to be x + 0 = x substituting s0 for x 10. from 4, 8, 9: s0 + 0 = s0 taking F to be x(x + 0 = x) taking G to be s0 + 0 = s0 11. axiom: x( y(x = y (A(x, x) A(x, y)))) 12. from 11 and 2: y(s0 + 0 = y (s0 + s0 = s(s0 + 0) s0 + s0 = sy)) taking A(x, y) to be s0 + s0 = sy taking F(x) to be y(x = y (s0 + s0 = sx s0 + s0 = sy)) substituting s0 + 0 for x 13. from 12 and 2: s0 + 0 = s0 (s0 + s0 = s(s0 + 0) s0 + s0 = ss0) taking F(x) to be s0 + 0 = y (s0 + s0 = s(s0 + 0) s0 + s0 = sy) substituting s0 for x 14. from 10, 13, 4: s0 + s0 = s(s0 + 0) s0 + s0 = ss0 taking F to be s0 + 0 = s0 taking G to be s0 + s0 = s(s0 + 0) s0 + s0 = ss0 15. from 7, 14, 4: s0 + s0 = ss0 taking F to be s0 + s0 = s(s0 + 0) taking G to be s0 + s0 = ss0

5 Gödel numbering All strings in a formal system are just sequences of symbols, and those symbols are drawn from a finite selection. We can assign each symbol a code number, and use those numbers to give every possible string a unique code, called its Gödel number. By a similar technique, we can also represent a list of strings as a number. Gödel s theorem we have a formal system that can generate strings which represent statements in basic arithmetic every string can be represented by a Gödel number every list of strings can be represented by a Gödel number if a list of strings can be generated by following the rules of the formal system, than that list serves as a proof that its final element can be generated every rule of a formal system is completely mechanical, and can be expressed in terms of basic arithmetic operations on Gödel numbers it is possible (but very complicated) to use basic arithmetic operations to check whether: a Gödel number represents a list of strings that list of strings can be generated by following the rules of the formal system it is possible (but very complicated) to write a string which uses basic arithmetic to say: take three variables: x, y and z x is the Gödel number of a list of strings that list of strings can be generated by following the rules of the formal system y is the Gödel number of a string with one free variable when the value of z is substituted into the string represented by y in place of its free variable, the resulting string is the final element in the list represented by x as a shorthand, call that huge string Proof(x, y, z) Proof(x, y, z) means x is the Gödel number of a proof of the string represented by y (with its free variable replaced by the number z) Proof(x, y, z) has its own Gödel number Proof(x, y, z) is a string, so x(proof(x, y, y)) is also (syntactically) a string x(proof(x, y, y)) is a modified version of Proof(x, y, z) where the first variable has been quantified and the other two have been made the same x(proof(x, y, y)) has one free variable x(proof(x, y, y)) means no proof exists of the string represented by y (with its free variable replaced by the number y) x(proof(x, y, y)) has its own Gödel number pretend it s 123 (although in the usual Gödel numbering scheme it would actually be something much larger! the book calls this number g )

6 if we replace the free variable in x(proof(x, y, y)) with 123, we get x(proof(x, 123, 123)) x(proof(x, 123, 123)) means no proof exists of the string represented by 123 (with its free variable replaced by the number 123) in other words, it means no proof of x(proof(x, 123, 123)) exists, i.e. this string cannot be proven Gödel s theorem: x(proof(x, 123, 123)) is true but has no proof in the formal system why? a proof by contradiction: assume the contrary, that x(proof(x, 123, 123)) has a proof that means x(proof(x, 123, 123)) is the final element of a list of strings that can be generated by following the rules of the formal system that list of strings has a Gödel number say it s 456 (again, in the normal system it would be something much larger! the book calls this number p ) if 456 is the Gödel number of a proof of x(proof(x, 123, 123)), then Proof(456, 123, 123) must be true: Proof(456, 123, 123) means 456 is the Gödel number of a proof of the string represented by 123 (with its free variable replaced by the number 123) the string represented by 123 is x(proof(x, y, y)) if we replace the free variable in x(proof(x, y, y)) with 123, we get x(proof(x, 123, 123)) so a proof does exist of the string represented by 123 (with its free variable replaced by the number 123) that proof is the list of strings represented by 456 but x(proof(x, 123, 123)) means no proof exists of the string represented by 123 (with its free variable replaced by the number 123) and that s a contradiction, so this hypothetical proof represented by 456 can t exist x(proof(x, 123, 123)) claims it cannot be proven, which is true so x(proof(x, 123, 123)) is a true string that can t be proved by the formal system

Propositional Logic Formal Syntax and Semantics. Computability and Logic

Propositional Logic Formal Syntax and Semantics. Computability and Logic Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship

More information

Hoare Logic. COMP2600 Formal Methods for Software Engineering. Rajeev Goré

Hoare Logic. COMP2600 Formal Methods for Software Engineering. Rajeev Goré Hoare Logic COMP2600 Formal Methods for Software Engineering Rajeev Goré Australian National University Semester 2, 2016 (Slides courtesy of Ranald Clouston) COMP 2600 Hoare Logic 1 Australian Capital

More information

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS

This is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS 1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be

More information

Lecture 3: Constructing the Natural Numbers

Lecture 3: Constructing the Natural Numbers Math/CS 120: Intro. to Math Professor: Padraic Bartlett Lecture 3: Constructing the Natural Numbers Weeks 3-4 UCSB 2014 When we defined what a proof was in our first set of lectures, we mentioned that

More information

Fundamental Concepts. Chapter 1

Fundamental Concepts. Chapter 1 Chapter 1 Fundamental Concepts This book is about the mathematical foundations of programming, with a special attention on computing with infinite objects. How can mathematics help in programming? There

More information

Introduction to Computer Science

Introduction to Computer Science Introduction to Computer Science A Quick Puzzle Well-Formed Formula any formula that is structurally correct may be meaningless Axiom A statement that is defined to be true Production Rule A rule that

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

Section 2.4: Arguments with Quantified Statements

Section 2.4: Arguments with Quantified Statements Section 2.4: Arguments with Quantified Statements In this section, we shall generalize the ideas we developed in Section 1.3 to arguments which involve quantified statements. Most of the concepts we shall

More information

CSC 501 Semantics of Programming Languages

CSC 501 Semantics of Programming Languages CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this

More information

Boolean algebra. June 17, Howard Huang 1

Boolean algebra. June 17, Howard Huang 1 Boolean algebra Yesterday we talked about how analog voltages can represent the logical values true and false. We introduced the basic Boolean operations AND, OR and NOT, which can be implemented in hardware

More information

Formal Semantics of Programming Languages

Formal Semantics of Programming Languages Formal Semantics of Programming Languages Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson http://www.daimi.au.dk/~bra8130/wiley_book/wiley.html Benefits of formal

More information

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions.

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions. CS 6110 S18 Lecture 18 Denotational Semantics 1 What is Denotational Semantics? So far we have looked at operational semantics involving rules for state transitions, definitional semantics involving translations

More information

THE HALTING PROBLEM. Joshua Eckroth Chautauqua Nov

THE HALTING PROBLEM. Joshua Eckroth Chautauqua Nov THE HALTING PROBLEM Joshua Eckroth Chautauqua Nov 10 2015 The year is 1928 Sliced bread is invented. Calvin Coolidge is President. David Hilbert challenged mathematicians to solve the Entscheidungsproblem:

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students

More information

Formal Semantics of Programming Languages

Formal Semantics of Programming Languages Formal Semantics of Programming Languages Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson http://www.daimi.au.dk/~bra8130/wiley_book/wiley.html Benefits of formal

More information

Lectures 20, 21: Axiomatic Semantics

Lectures 20, 21: Axiomatic Semantics Lectures 20, 21: Axiomatic Semantics Polyvios Pratikakis Computer Science Department, University of Crete Type Systems and Static Analysis Based on slides by George Necula Pratikakis (CSD) Axiomatic Semantics

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

CS61A Lecture 38. Robert Huang UC Berkeley April 17, 2013

CS61A Lecture 38. Robert Huang UC Berkeley April 17, 2013 CS61A Lecture 38 Robert Huang UC Berkeley April 17, 2013 Announcements HW12 due Wednesday Scheme project, contest out Review: Program Generator A computer program is just a sequence of bits It is possible

More information

Programming Languages Third Edition

Programming Languages Third Edition Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand

More information

AXIOMS FOR THE INTEGERS

AXIOMS FOR THE INTEGERS AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning

More information

Material from Recitation 1

Material from Recitation 1 Material from Recitation 1 Darcey Riley Frank Ferraro January 18, 2011 1 Introduction In CSC 280 we will be formalizing computation, i.e. we will be creating precise mathematical models for describing

More information

An Interesting Way to Combine Numbers

An Interesting Way to Combine Numbers An Interesting Way to Combine Numbers Joshua Zucker and Tom Davis October 12, 2016 Abstract This exercise can be used for middle school students and older. The original problem seems almost impossibly

More information

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

6.080 / Great Ideas in Theoretical Computer Science Spring 2008 MIT OpenCourseWare http://ocw.mit.edu 6.8 / 6.89 Great Ideas in Theoretical Computer Science Spring 28 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

Order from Chaos. Nebraska Wesleyan University Mathematics Circle

Order from Chaos. Nebraska Wesleyan University Mathematics Circle Order from Chaos Nebraska Wesleyan University Mathematics Circle Austin Mohr Department of Mathematics Nebraska Wesleyan University February 2, 20 The (, )-Puzzle Start by drawing six dots at the corners

More information

Discrete Mathematics Lecture 4. Harper Langston New York University

Discrete Mathematics Lecture 4. Harper Langston New York University Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 19 Tuesday, April 3, 2018 1 Introduction to axiomatic semantics The idea in axiomatic semantics is to give specifications

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

Lecture 5 - Axiomatic semantics

Lecture 5 - Axiomatic semantics Program Verification March 2014 Lecture 5 - Axiomatic semantics Lecturer: Noam Rinetzky Scribes by: Nir Hemed 1.1 Axiomatic semantics The development of the theory is contributed to Robert Floyd, C.A.R

More information

Automated Reasoning. Natural Deduction in First-Order Logic

Automated Reasoning. Natural Deduction in First-Order Logic Automated Reasoning Natural Deduction in First-Order Logic Jacques Fleuriot Automated Reasoning Lecture 4, page 1 Problem Consider the following problem: Every person has a heart. George Bush is a person.

More information

Nonstandard Models of True Arithmetic. other models of true arithmetic (the set of sentences true in the standard model) that aren t

Nonstandard Models of True Arithmetic. other models of true arithmetic (the set of sentences true in the standard model) that aren t Nonstandard Models of True Arithmetic We have talked a lot about the standard model of the language of arithmetic, but there are other models of true arithmetic (the set of sentences true in the standard

More information

Semantics via Syntax. f (4) = if define f (x) =2 x + 55.

Semantics via Syntax. f (4) = if define f (x) =2 x + 55. 1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)

More information

6.001 Notes: Section 6.1

6.001 Notes: Section 6.1 6.001 Notes: Section 6.1 Slide 6.1.1 When we first starting talking about Scheme expressions, you may recall we said that (almost) every Scheme expression had three components, a syntax (legal ways of

More information

Name: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001

Name: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001 Name: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001 This is a 75-minute, open-book exam. Take a minute to look over the exam, and begin by answering the questions you feel most comfortable

More information

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions): CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding

More information

Order from Chaos. University of Nebraska-Lincoln Discrete Mathematics Seminar

Order from Chaos. University of Nebraska-Lincoln Discrete Mathematics Seminar Order from Chaos University of Nebraska-Lincoln Discrete Mathematics Seminar Austin Mohr Department of Mathematics Nebraska Wesleyan University February 8, 20 The (, )-Puzzle Start by drawing six dots

More information

Chapter 3 (part 3) Describing Syntax and Semantics

Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 (part 3) Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings

More information

Induction and Semantics in Dafny

Induction and Semantics in Dafny 15-414 Lecture 11 1 Instructor: Matt Fredrikson Induction and Semantics in Dafny TA: Ryan Wagner Encoding the syntax of Imp Recall the abstract syntax of Imp: a AExp ::= n Z x Var a 1 + a 2 b BExp ::=

More information

Grade 6 Math Circles November 6 & Relations, Functions, and Morphisms

Grade 6 Math Circles November 6 & Relations, Functions, and Morphisms Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Relations Let s talk about relations! Grade 6 Math Circles November 6 & 7 2018 Relations, Functions, and

More information

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements

System Correctness. EEC 421/521: Software Engineering. System Correctness. The Problem at Hand. A system is correct when it meets its requirements System Correctness EEC 421/521: Software Engineering A Whirlwind Intro to Software Model Checking A system is correct when it meets its requirements a design without requirements cannot be right or wrong,

More information

Program Analysis: Lecture 02 Page 1 of 32

Program Analysis: Lecture 02 Page 1 of 32 Program Analysis: Lecture 02 Page 1 of 32 Program Analysis/ Mooly Sagiv Lecture 1, 31/10/2012 Operational Semantics Notes by: Kalev Alpernas As background to the subject of Program Analysis, we will first

More information

Propositional Logic. Part I

Propositional Logic. Part I Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.

More information

CPSC 121: Models of Computation. Module 5: Predicate Logic

CPSC 121: Models of Computation. Module 5: Predicate Logic CPSC 121: Models of Computation Module 5: Predicate Logic Module 5: Predicate Logic Midterm 1: Friday February 9 th, 17:00 to 18:15 A to C (by last name): room DMP 310 D to K: room MATH 100 L to P: room

More information

Denotational semantics

Denotational semantics 1 Denotational semantics 2 What we're doing today We're looking at how to reason about the effect of a program by mapping it into mathematical objects Specifically, answering the question which function

More information

Shared Variables and Interference

Shared Variables and Interference Illinois Institute of Technology Lecture 24 Shared Variables and Interference CS 536: Science of Programming, Spring 2018 A. Why Parallel programs can coordinate their work using shared variables, but

More information

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m.

Note that in this definition, n + m denotes the syntactic expression with three symbols n, +, and m, not to the number that is the sum of n and m. CS 6110 S18 Lecture 8 Structural Operational Semantics and IMP Today we introduce a very simple imperative language, IMP, along with two systems of rules for evaluation called small-step and big-step semantics.

More information

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences.

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences. Quantification In this and subsequent chapters, we will develop a more formal system of dealing with categorical statements, one that will be much more flexible than traditional logic, allow a deeper analysis

More information

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?

Diagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? Diagonalization Cardinalities The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? We say that a set S has at least as great cardinality as set T, written S T, if

More information

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures Lecture 5: Predicate Calculus ffl Predicate Logic ffl The Language ffl Semantics: Structures 1 Why Predicate Logic? Propositional logic is not powerful enough to express statements such as ffl For every

More information

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1

HOL DEFINING HIGHER ORDER LOGIC LAST TIME ON HOL CONTENT. Slide 3. Slide 1. Slide 4. Slide 2 WHAT IS HIGHER ORDER LOGIC? 2 LAST TIME ON HOL 1 LAST TIME ON HOL Proof rules for propositional and predicate logic Safe and unsafe rules NICTA Advanced Course Forward Proof Slide 1 Theorem Proving Principles, Techniques, Applications Slide 3 The Epsilon

More information

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur Module 6 Knowledge Representation and Logic (First Order Logic) Lesson 15 Inference in FOL - I 6.2.8 Resolution We have introduced the inference rule Modus Ponens. Now we introduce another inference rule

More information

Introduction to Boolean Algebra

Introduction to Boolean Algebra Introduction to Boolean Algebra Boolean algebra which deals with two-valued (true / false or and ) variables and functions find its use in modern digital computers since they too use two-level systems

More information

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees

Logic: The Big Picture. Axiomatizing Arithmetic. Tautologies and Valid Arguments. Graphs and Trees Axiomatizing Arithmetic Logic: The Big Picture Suppose we restrict the domain to the natural numbers, and allow only the standard symbols of arithmetic (+,, =, >, 0, 1). Typical true formulas include:

More information

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs?

Part II. Hoare Logic and Program Verification. Why specify programs? Specification and Verification. Code Verification. Why verify programs? Part II. Hoare Logic and Program Verification Part II. Hoare Logic and Program Verification Dilian Gurov Props: Models: Specs: Method: Tool: safety of data manipulation source code logic assertions Hoare

More information

Introduction to Axiomatic Semantics (1/2)

Introduction to Axiomatic Semantics (1/2) #1 Introduction to Axiomatic Semantics (1/2) How s The Homework Going? Remember that you can t just define a meaning function in terms of itself you must use some fixed point machinery. #2 #3 Observations

More information

We ve studied the main models and concepts of the theory of computation:

We ve studied the main models and concepts of the theory of computation: CMPSCI 601: Summary & Conclusions Lecture 27 We ve studied the main models and concepts of the theory of computation: Computability: what can be computed in principle Logic: how can we express our requirements

More information

The Formal Semantics of Programming Languages An Introduction. Glynn Winskel. The MIT Press Cambridge, Massachusetts London, England

The Formal Semantics of Programming Languages An Introduction. Glynn Winskel. The MIT Press Cambridge, Massachusetts London, England The Formal Semantics of Programming Languages An Introduction Glynn Winskel The MIT Press Cambridge, Massachusetts London, England Series foreword Preface xiii xv 1 Basic set theory 1 1.1 Logical notation

More information

Introduction to Boolean Algebra

Introduction to Boolean Algebra Introduction to Boolean Algebra Boolean algebra which deals with two-valued (true / false or and ) variables and functions find its use in modern digital computers since they too use two-level systems

More information

Shared Variables and Interference

Shared Variables and Interference Solved Shared Variables and Interference CS 536: Science of Programming, Fall 2018 A. Why Parallel programs can coordinate their work using shared variables, but it s important for threads to not interfere

More information

SOFTWARE ENGINEERING DESIGN I

SOFTWARE ENGINEERING DESIGN I 2 SOFTWARE ENGINEERING DESIGN I 3. Schemas and Theories The aim of this course is to learn how to write formal specifications of computer systems, using classical logic. The key descriptional technique

More information

Intro. Speed V Growth

Intro. Speed V Growth Intro Good code is two things. It's elegant, and it's fast. In other words, we got a need for speed. We want to find out what's fast, what's slow, and what we can optimize. First, we'll take a tour of

More information

Part I Logic programming paradigm

Part I Logic programming paradigm Part I Logic programming paradigm 1 Logic programming and pure Prolog 1.1 Introduction 3 1.2 Syntax 4 1.3 The meaning of a program 7 1.4 Computing with equations 9 1.5 Prolog: the first steps 15 1.6 Two

More information

Semantics. There is no single widely acceptable notation or formalism for describing semantics Operational Semantics

Semantics. There is no single widely acceptable notation or formalism for describing semantics Operational Semantics There is no single widely acceptable notation or formalism for describing semantics Operational Describe the meaning of a program by executing its statements on a machine, either simulated or actual. The

More information

Lecture 5: The Halting Problem. Michael Beeson

Lecture 5: The Halting Problem. Michael Beeson Lecture 5: The Halting Problem Michael Beeson Historical situation in 1930 The diagonal method appears to offer a way to extend just about any definition of computable. It appeared in the 1920s that it

More information

1 Introduction CHAPTER ONE: SETS

1 Introduction CHAPTER ONE: SETS 1 Introduction CHAPTER ONE: SETS Scientific theories usually do not directly describe the natural phenomena under investigation, but rather a mathematical idealization of them that abstracts away from

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam

More information

The Undecidable and the Unprovable

The Undecidable and the Unprovable The Undecidable and the Unprovable Jeff Sanford Russell Spring 2017 The main purpose of these notes is to help you understand some beautiful and important facts about the limits of computation and logic.

More information

First Order Predicate Logic CIS 32

First Order Predicate Logic CIS 32 First Order Predicate Logic CIS 32 Functionalia Demos? HW 3 is out on the web-page. Today: Predicate Logic Constructing the Logical Agent Predicate Logic First-order predicate logic More expressive than

More information

Introduction to Axiomatic Semantics (1/2)

Introduction to Axiomatic Semantics (1/2) #1 Introduction to Axiomatic Semantics (1/2) How s The Homework Going? Remember: just do the counterexample guided abstraction refinement part of DPLL(T). If you notice any other errors, those are good

More information

Chapter 12. Computability Mechanizing Reasoning

Chapter 12. Computability Mechanizing Reasoning Chapter 12 Computability Gödel s paper has reached me at last. I am very suspicious of it now but will have to swot up the Zermelo-van Neumann system a bit before I can put objections down in black & white.

More information

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in .

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in  . 0.1 More on innity.math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in email. 0.1.1 If you haven't read 1.3, do so now! In notes#1

More information

Functional Languages. Hwansoo Han

Functional Languages. Hwansoo Han Functional Languages Hwansoo Han Historical Origins Imperative and functional models Alan Turing, Alonzo Church, Stephen Kleene, Emil Post, etc. ~1930s Different formalizations of the notion of an algorithm

More information

Program Verification & Testing; Review of Propositional Logic

Program Verification & Testing; Review of Propositional Logic 8/24: p.1, solved; 9/20: p.5 Program Verification & Testing; Review of Propositional Logic CS 536: Science of Programming, Fall 2018 A. Why Course guidelines are important. Active learning is the style

More information

CSC Discrete Math I, Spring Sets

CSC Discrete Math I, Spring Sets CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its

More information

Lambda Calculus. Type Systems, Lectures 3. Jevgeni Kabanov Tartu,

Lambda Calculus. Type Systems, Lectures 3. Jevgeni Kabanov Tartu, Lambda Calculus Type Systems, Lectures 3 Jevgeni Kabanov Tartu, 13.02.2006 PREVIOUSLY ON TYPE SYSTEMS Arithmetical expressions and Booleans Evaluation semantics Normal forms & Values Getting stuck Safety

More information

Planar Graphs and Surfaces. Graphs 2 1/58

Planar Graphs and Surfaces. Graphs 2 1/58 Planar Graphs and Surfaces Graphs 2 1/58 Last time we discussed the Four Color Theorem, which says that any map can be colored with at most 4 colors and not have two regions that share a border having

More information

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic

3.4 Deduction and Evaluation: Tools Conditional-Equational Logic 3.4 Deduction and Evaluation: Tools 3.4.1 Conditional-Equational Logic The general definition of a formal specification from above was based on the existence of a precisely defined semantics for the syntax

More information

Recursively Enumerable Languages, Turing Machines, and Decidability

Recursively Enumerable Languages, Turing Machines, and Decidability Recursively Enumerable Languages, Turing Machines, and Decidability 1 Problem Reduction: Basic Concepts and Analogies The concept of problem reduction is simple at a high level. You simply take an algorithm

More information

4.7 Approximate Integration

4.7 Approximate Integration 4.7 Approximate Integration Some anti-derivatives are difficult to impossible to find. For example, 1 0 e x2 dx or 1 1 1 + x3 dx We came across this situation back in calculus I when we introduced the

More information

Basic Foundations of Isabelle/HOL

Basic Foundations of Isabelle/HOL Basic Foundations of Isabelle/HOL Peter Wullinger May 16th 2007 1 / 29 1 Introduction into Isabelle s HOL Why Type Theory Basic Type Syntax 2 More HOL Typed λ Calculus HOL Rules 3 Example proof 2 / 29

More information

Logic and its Applications

Logic and its Applications Logic and its Applications Edmund Burke and Eric Foxley PRENTICE HALL London New York Toronto Sydney Tokyo Singapore Madrid Mexico City Munich Contents Preface xiii Propositional logic 1 1.1 Informal introduction

More information

An Evolution of Mathematical Tools

An Evolution of Mathematical Tools An Evolution of Mathematical Tools From Conceptualization to Formalization Here's what we do when we build a formal model (or do a computation): 0. Identify a collection of objects/events in the real world.

More information

Introduction to Axiomatic Semantics

Introduction to Axiomatic Semantics Introduction to Axiomatic Semantics Meeting 10, CSCI 5535, Spring 2009 Announcements Homework 3 due tonight Homework 2 is graded 13 (mean), 14 (median), out of 21 total, but Graduate class: final project

More information

Recursive Functions. Recursive functions are built up from basic functions by some operations.

Recursive Functions. Recursive functions are built up from basic functions by some operations. Recursive Functions Recursive functions are built up from basic functions by some operations. The Successor Function Let s get very primitive. Suppose we have 0 defined, and want to build the nonnegative

More information

Strategies for Proofs

Strategies for Proofs Strategies for Proofs Landscape with House and Ploughman Van Gogh Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois 1 Goals of this lecture A bit more logic Reviewing Implication

More information

INTLOGS17 Test 1. Prof: S Bringsjord TA: Rini Palamittam NY

INTLOGS17 Test 1. Prof: S Bringsjord TA: Rini Palamittam NY INTLOGS17 Test 1 Prof: S Bringsjord TA: Rini Palamittam 0306170626NY Immediate Action Items: Please now, before you do anything else, write down the following details on the Scantron sheets as well as

More information

CITS5501 Software Testing and Quality Assurance Formal methods

CITS5501 Software Testing and Quality Assurance Formal methods CITS5501 Software Testing and Quality Assurance Formal methods Unit coordinator: Arran Stewart May 1, 2018 1 / 49 Sources Pressman, R., Software Engineering: A Practitioner s Approach, McGraw-Hill, 2005

More information

Proving the Correctness of Distributed Algorithms using TLA

Proving the Correctness of Distributed Algorithms using TLA Proving the Correctness of Distributed Algorithms using TLA Khushboo Kanjani, khush@cs.tamu.edu, Texas A & M University 11 May 2007 Abstract This work is a summary of the Temporal Logic of Actions(TLA)

More information

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION Alessandro Artale UniBZ - http://www.inf.unibz.it/ artale/ SECTION 5.5 Application: Correctness of Algorithms Copyright Cengage Learning. All

More information

What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora

What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora Administrivia In class midterm in midterms week; Thurs Mar 13 (closed book;? No lab in midterms week; review session instead. What computers

More information

Goals: Define the syntax of a simple imperative language Define a semantics using natural deduction 1

Goals: Define the syntax of a simple imperative language Define a semantics using natural deduction 1 Natural Semantics Goals: Define the syntax of a simple imperative language Define a semantics using natural deduction 1 1 Natural deduction is an instance of first-order logic; that is, it is the formal

More information

Starting Boolean Algebra

Starting Boolean Algebra Boolean Algebra March 2, 27 Diagram for FunChip2 Here is a picture of FunChip2 that we created more or less randomly in class on /25 (used in various Activities): Starting Boolean Algebra Boolean algebra

More information

Lecture 3: Recursion; Structural Induction

Lecture 3: Recursion; Structural Induction 15-150 Lecture 3: Recursion; Structural Induction Lecture by Dan Licata January 24, 2012 Today, we are going to talk about one of the most important ideas in functional programming, structural recursion

More information

Interpretations and Models. Chapter Axiomatic Systems and Incidence Geometry

Interpretations and Models. Chapter Axiomatic Systems and Incidence Geometry Interpretations and Models Chapter 2.1-2.4 - Axiomatic Systems and Incidence Geometry Axiomatic Systems in Mathematics The gold standard for rigor in an area of mathematics Not fully achieved in most areas

More information

Proofs are Programs. Prof. Clarkson Fall Today s music: Proof by Paul Simon

Proofs are Programs. Prof. Clarkson Fall Today s music: Proof by Paul Simon Proofs are Programs Prof. Clarkson Fall 2017 Today s music: Proof by Paul Simon Review Previously in 3110: Functional programming in Coq Logic in Coq Today: A fundamental idea that goes by many names...

More information

(Refer Slide Time 6:48)

(Refer Slide Time 6:48) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 8 Karnaugh Map Minimization using Maxterms We have been taking about

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic. Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to

More information

Software System Design and Implementation

Software System Design and Implementation Software System Design and Implementation Admin & Motivation & Some History Gabriele Keller Admin: Liam O Connor-Davies The University of New South Wales School of Computer Science and Engineering Sydney,

More information

9 R1 Get another piece of paper. We re going to have fun keeping track of (inaudible). Um How much time do you have? Are you getting tired?

9 R1 Get another piece of paper. We re going to have fun keeping track of (inaudible). Um How much time do you have? Are you getting tired? Page: 1 of 14 1 R1 And this is tell me what this is? 2 Stephanie x times y plus x times y or hm? 3 R1 What are you thinking? 4 Stephanie I don t know. 5 R1 Tell me what you re thinking. 6 Stephanie Well.

More information

Programming with Math and Logic

Programming with Math and Logic .. Programming with Math and Logic an invitation to functional programming Ed Morehouse Wesleyan University The Plan why fp? terms types interfaces The What and Why of Functional Programming Computing

More information