PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2

Similar documents
PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4

Informal Statement Calculus

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

15414/614 Optional Lecture 3: Predicate Logic

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

Decidability: Church-Turing Thesis

Axiomatic Semantics. Lecture 9 CS 565 2/12/08

Learning Goals of CS245 Logic and Computation

Predicate Logic - Undecidability

Predicate Calculus. CS 270 Math Foundations of Computer Science Jeremy Johnson

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

CST Part IB. Computation Theory. Andrew Pitts

06 From Propositional to Predicate Logic

CMPS 217 Logic in Computer Science. Lecture #17

258 Handbook of Discrete and Combinatorial Mathematics

Classical First-Order Logic

First-Order Logic (FOL)

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

Propositional and Predicate Logic - XIII

Institute for Applied Information Processing and Communications (IAIK) Secure & Correct Systems. Decidability

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Classical First-Order Logic

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

CS 275 Automata and Formal Language Theory

3 Propositional Logic

Warm-Up Problem. Please fill out your Teaching Evaluation Survey! Please comment on the warm-up problems if you haven t filled in your survey yet.

GS03/4023: Validation and Verification Predicate Logic Jonathan P. Bowen Anthony Hall

Decidable Languages - relationship with other classes.

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Sequent calculus for predicate logic

Introduction to Turing Machines

CS 275 Automata and Formal Language Theory

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

Propositional Logic: Deductive Proof & Natural Deduction Part 1

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

17.1 The Halting Problem

Natural Deduction for Propositional Logic

Advanced Topics in LP and FP

Logic and Probability Lecture 3: Beyond Boolean Logic

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)

Intelligent Agents. Formal Characteristics of Planning. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University

Propositional logic. First order logic. Alexander Clark. Autumn 2014

CS720 Class Notes. Steve Revilak

Introduction to Logic in Computer Science: Autumn 2006

Logic Part II: Intuitionistic Logic and Natural Deduction

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

Part 1: Propositional Logic

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

Answers to the CSCE 551 Final Exam, April 30, 2008

Computability Theory. CS215, Lecture 6,

First Order Logic vs Propositional Logic CS477 Formal Software Dev Methods

CS156: The Calculus of Computation Zohar Manna Winter 2010

LOGIC PROPOSITIONAL REASONING

03 Propositional Logic II

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

The Church-Turing Thesis and Relative Recursion

CS 301. Lecture 17 Church Turing thesis. Stephen Checkoway. March 19, 2018

Propositional Logic: Evaluating the Formulas

CHAPTER 2. FIRST ORDER LOGIC

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional and Predicate Logic. jean/gbooks/logic.html

Foundations of Logic Programming

ELEMENTS IN MATHEMATICS FOR INFORMATION SCIENCE NO.6 TURING MACHINE AND COMPUTABILITY. Tatsuya Hagino

COMP2411 Lecture 10: Propositional Logic Programming. Note: This material is not covered in the book. Resolution Applied to Horn Clauses

CSE 311 Lecture 28: Undecidability of the Halting Problem. Emina Torlak and Kevin Zatloukal

The constructible universe

CA320 - Computability & Complexity

Theoretical Foundations of the UML

Propositional Logic Not Enough

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

Propositional Logic: Part II - Syntax & Proofs 0-0

if t 1,...,t k Terms and P k is a k-ary predicate, then P k (t 1,...,t k ) Formulas (atomic formulas)

Cogito ergo sum non machina!

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Artificial Intelligence Knowledge Representation I

Halting and Equivalence of Schemes over Recursive Theories

Propositions as Types

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation

Outline. Logic. Definition. Theorem (Gödel s Completeness Theorem) Summary of Previous Week. Undecidability. Unification


185.A09 Advanced Mathematical Logic

Part I: Propositional Calculus

Computational Logic. Recall of First-Order Logic. Damiano Zanardini

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Herbrand Theorem, Equality, and Compactness

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

Propositional Logic Language

Logic: Propositional Logic Truth Tables

Logic: The Big Picture

Handbook of Logic and Proof Techniques for Computer Science

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

Predicate Logic. Predicates. Math 173 February 9, 2010

α-recursion Theory and Ordinal Computability

Transcription:

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2 Neil D. Jones DIKU 2005 12 September, 2005 Some slides today new, some based on logic 2004 (Nils Andersen)

OUTLINE Proof rules for the new logic: Propositional connectives Equality Quantifiers Quantifier equivalences Soundness Gödel s completeness theorem (only what it says, not how it is proven) Decidability in general Decidability of propositional logic 1

SUBSTITUTION Definition 2.6: For a formula ϕ, a variable x and a term t we use ϕ[t/x] to denote the result of replacing each free occurrence of x in ϕ with t 1. Examples: y(x < y)[0/x] is y(0 < y). But consider y(x < y)[y/x]; unintended effect! Definition 2.7: For a formula ϕ, a variable x and a term t: t is free for x in ϕ, if for each variable y occurring free in t, whenever ϕ contains a subformula of form yψ or yψ, no free occurrence of x is contained in ψ. In other words: no free occurrence of x in ϕ lies in the scope of a quantifier binding a variable free in t. Convention 2.8: When using the notation ϕ[t/x] we implicitly assume that t is free for x in ϕ. 1 Mnemonics: divide away x, and replace it with t. Other notation in use is Sub x t (ϕ), ϕ[x := t] and ϕ x[t] 2

PROPOSITIONAL CONNECTIVES The old rules I, I, e 1, e 2, I 1, I 2, e, I, e, I, e, I, e, e are carried over (used without change). So, as a technical device, is added to the language of formulas (or it could be considered as an abbreviation for any formula of the form P (...) P (...)). 3

PROOF RULES FOR EQUALITY t = t =I t 1 = t 2 φ[t 1 /x] φ[t 2 /x] =e These rules suffice for symmetry and transitivity as well: Proof of symmetry: Proof of transitivity: 1 t 1 = t 2 premise 2 t 1 = t 1 =I 3 t 2 = t 1 =e 1,2 (using φ x = t 1 ) 1 t 2 = t 3 premise 2 t 1 = t 2 premise 3 t 1 = t 3 =e 1,2 (using φ t 1 = x) 4

PROOF RULES FOR UNIVERSAL QUANTIFIERS xφ φ[t/x] xe x 0. φ[x 0 /x] xφ xi 5

PROOF RULES FOR EXISTENTIAL QUANTIFIERS φ[t/x] xφ xi xφ x 0 φ[x 0 /x]. χ χ xe 6

QUANTIFIER EQUIVALENCES xφ x φ xφ x φ x yφ y xφ x yφ y xφ x(φ ψ) xφ xψ x(φ ψ) xφ xψ x(φ ψ) xφ xψ Provided x is not free in ψ, the following is valid: x(φ ψ) xφ ψ x(φ ψ) xψ ψ x(φ ψ) xφ ψ x(φ ψ) xφ ψ x(ψ φ) ψ xφ x(ψ φ) ψ xφ x(φ ψ) xφ ψ x(φ ψ) xφ ψ But note the following directed deductions: xφ xψ x(φ ψ) x(φ ψ) xφ xψ 7

SOUNDNESS AND COMPLETENESS Let M be a model (interpretation) for predicate calculus formulas. Definition Formula φ is valid iff M = φ holds for every model M. Definition Proof system is sound iff for any closed predicate formula φ we have: φ implies M = φ for every modelm In brief: any provable formula is valid. Proof system is complete iff for any closed predicate formula φ : φ if M = φ for every modelm In brief: any valid formula is provable. Remark: Validity is a very strong condition to place on a formula φ: φ must hold in all models. In contrast to most mathematical reasoning: about one model at a time. 8

GÖDEL S COMPLETENESS THEOREM The proof system described in Huth and Ryan s book is both sound and complete: For any closed predicate formula, φ iff M = φ for every model M. Proof ideas (Gödel s completeness theorem): 1. Soundness: This is straightforward. 2. Completeness: This is much trickier, as it involves constructing a model of φ just in case φ is not provable. Since Gödel s original proof a variety of simpler alternatives have been devised, but all are too subtle and technically involved to present here. 9

ON THE PROOF OF GÖDEL S COMPLETENESS THEOREM This is decidedly nontrivial. The trickiest part is the Herbrand property: If φ then I = φ holds finitely for some interpretation I, i.e., an interpretation I can be found such that there is a finite counterexample to φ. A final remark. Gödel s completeness theorem is the basis of the logic programming language PROLOG. The computation paradigm of PROLOG is systematically to search for a refutation of the negation of the current goal, in essence searching for such finite counterexamples. 10

COMPUTABILITY Church-Turing s thesis: All computation mechanisms are equally strong. (Programming languages, lambda calculus, Turing machines, recursive functions, rewriting systems, Markov algorithms etc.) A (decision) problem (over an alphabet Σ) is a subset A Σ. A Σ Definition A decision problem A over Σ is decidable if there is a program p that computes its characteristic function: { true if x A [[p]](x) = false if x / A (for any input x Σ ). 11

THE ORIGIN OF ALL UNSOLVABLE PROBLEMS Theorem The following function is not computed by any program: { true if [[p]](d) halts halt(p, d) = false otherwise Proof Suppose halt were computed by some program q, i.e., { true if [[p]](d) halts [[q]](p.d) = false otherwise Let the form of q be: read X; C; write Y 12

BUILD A NEW PROGRAM r FROM q read X; X := cons X X; (* Does program X stop on input X? *) C; (* Apply program q to answer this *) if Y then while Y do Y:=Y (* Loop if X halts on input X *) else write Y (* Terminate if it does not stop *) Consider the input X = r. Now either [[r]](r) halts or it loops. If [[r]](r) halts, then r reaches the else branch, so Y = false holds after command C. This implies [[r]](r) loops by the assumption that q computes halt. If [[r]](r) loops, then reaches the then branch. But then Y = true holds after C, so [[r]](r) halts since q computes halt, another contradiction. The only unjustified assumption was the existence of a program q that computes halt, so this must be false. 13

THE PROPOSITIONAL CALCULUS IS DECIDABLE Provability in the propositional calculus is decidable: Theorem The following function is computable by some program: provable(φ) = { true if φ false otherwise Proof By completeness, φ is true if and only if = φ. We can decide = φ by constructing a truth-table for φ, with one row for every combination of truth values for the propositional variables in φ. This can be done in time O(2 φ ). Whether it can be done in polynomial time is a question that has been open for many years, as it would imply p = np. Next lecture: Provability in the predicate calculus is undecidable. 14