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

Similar documents

Overview of Topics. Finite Model Theory. Finite Model Theory. Connections to Database Theory. Qing Wang

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

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

Propositional and Predicate Logic - XIII

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

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

Abstract model theory for extensions of modal logic

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

03 Review of First-Order Logic

Herbrand Theorem, Equality, and Compactness

Chapter 4: Computation tree logic

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

Chapter 3: Propositional Calculus: Deductive Systems. September 19, 2008

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Harmonious Logic: Craig s Interpolation Theorem and its Descendants. Solomon Feferman Stanford University

CMPS 217 Logic in Computer Science. Lecture #17

A brief introduction to Logic. (slides from

Part II Logic and Set Theory

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

Completeness in the Monadic Predicate Calculus. We have a system of eight rules of proof. Let's list them:

Propositional Logic: Models and Proofs

CS156: The Calculus of Computation Zohar Manna Winter 2010

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

On some Metatheorems about FOL

Propositional Logic Language

Logic: Propositional Logic Truth Tables

First-Order Predicate Logic. Basics

Model Theory on Finite Structures

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

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

FINITE MODEL THEORY (MATH 285D, UCLA, WINTER 2017) LECTURE NOTES IN PROGRESS

Chapter 6: Computation Tree Logic

First-Order Logic (FOL)

Logic Part II: Intuitionistic Logic and Natural Deduction

4 Quantifiers and Quantified Arguments 4.1 Quantifiers

Proofs in classical logic as programs: a generalization of lambda calculus. A. Salibra. Università Ca Foscari Venezia

First Order Logic (FOL) 1 znj/dm2017

4 Predicate / First Order Logic

Introduction to Logic in Computer Science: Autumn 2006

Part III Logic. Theorems. Based on lectures by T. E. Forster Notes taken by Dexter Chua. Lent 2017

Handbook of Logic and Proof Techniques for Computer Science

Model Theory MARIA MANZANO. University of Salamanca, Spain. Translated by RUY J. G. B. DE QUEIROZ

Introduction to Model Theory

Advanced Topics in LP and FP

Logic: The Big Picture

More Model Theory Notes

First Order Logic (FOL)

Lecture 13: Soundness, Completeness and Compactness

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Classical First-Order Logic

Lecture 13, Fall 04/05

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

07 Equational Logic and Algebraic Reasoning

Tecniche di Verifica. Introduction to Propositional Logic

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic

Finite Model Theory Tutorial. Lecture 1

Basics of Model Theory

Logic for Computer Scientists

Logic for Computer Scientists

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Mathematical Logic (IX)

Chapter 7 Propositional Satisfiability Techniques

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak

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

2.2 Lowenheim-Skolem-Tarski theorems

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

Propositional Logic: Deductive Proof & Natural Deduction Part 1

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning.

Inference in first-order logic

Mathematical Logic 1

Informal Statement Calculus

Learning Goals of CS245 Logic and Computation

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

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

CMPSCI 601: Tarski s Truth Definition Lecture 15. where

Classical Propositional Logic

LOGIC. Mathematics. Computer Science. Stanley N. Burris

Logic and Probability Lecture 3: Beyond Boolean Logic

CS 730/730W/830: Intro AI

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Tutorial 1: Modern SMT Solvers and Verification

Cooperation of Background Reasoners in Theory Reasoning by Residue Sharing

An Introduction to Proof Complexity, Part II.

The Syntax of First-Order Logic. Marc Hoyois

Propositional and Predicate Logic - IV

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

The Language. Elementary Logic. Outline. Well-Formed Formulae (wff s)

CS21 Decidability and Tractability

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

A Resolution Method for Modal Logic S5

Propositional and Predicate Logic - V

Lecture 2: Syntax. January 24, 2018

CONSERVATION by Harvey M. Friedman September 24, 1999

Lloyd-Topor Completion and General Stable Models

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Propositional Logic Not Enough

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

Transcription:

Summary Summary Last Lecture Computational Logic Π 1 Γ, x : σ M : τ Γ λxm : σ τ Γ (λxm)n : τ Π 2 Γ N : τ = Π 1 [x\π 2 ] Γ M[x := N] Georg Moser Institute of Computer Science @ UIBK Winter 2012 the proof Π 1 [x\π 2 ] represents the proof that is obtained from Π 1 by replacing assumptions corresponding to the variable x by Π 2 Remark the Curry-Howard correspondence extends to many systems: intuitionistic logic and λ-calculus Hilbert axioms and combinatory logic Summary Outline of the Lecture Propositional Logic short reminder of propositional logic, soundness and completeness theorem, natural deduction, propositional resolution First Order Logic introduction, syntax, semantics, undecidability of first-order, Löwenheim- Skolem, compactness, model existence theorem, natural deduction, completeness, normalisation Properties of First Order Logic Craig s Interpolation Theorem, Robinson s Joint Consistency Theorem, Herbrand s Theorem Limits and Extensions of First Order Logic Intuitionistic Logic, Curry-Howard Isomorphism, Limits, Second-Order Logic GM (Institute of Computer Science @ UIBK) Computational Logic 147/163 Limits Limits of First-Order Logic Lemma given a directed graph G, we can not express the following: let s and t be nodes in G, then there exists a path from s to t Proof Sketch 1 let A be a formula that expresses that node t is reachable from s 2 let B n express that path of length n between s and t 3 C := A {B n n 1} is unsatisfiable 4 finite C 0 C, C 0 is satisfiable 5 contradiction to compactness reachability is not expressible in first-order logic; ie, there is no formula F (x, y) such that F holds iff path in graph G from l(x) to l(y) GM (Institute of Computer Science @ UIBK) Computational Logic 148/163 GM (Institute of Computer Science @ UIBK) Computational Logic 149/163

Limits Limits Question what about an infinite set of formulas? let H be a set of sentences (of L) and let Mod(H) = {A A is a structure (of L) and A = H} let K be a collection of structures Fact K is elementary if sentence F and K = Mod(F ) K is -elementary if set of sentences H and K = Mod(H) each elementary class is -elementary every -elementary class is the intersection of elementary classes: Mod(F) = Mod(F ) GM (Institute of Computer Science @ UIBK) Computational Logic 150/163 F F The Language of a second-order language extends a first-order language as follows 1 first-order variables individual variables 2 relation (or predicate) variables V0 i, V 1 i,, V j i, 3 function variables u0 i, ui 1,, ui j, denoted X, Y, Z, etc denoted u, v, w, etc second-order terms are defined like first-order terms together with the following clause 1 if t 1,, t n are second-order terms, u an n-ary function variable, then u(t 1,, t n ) is a second-order term a second-order terms without function variables is first-order reachability is not expressible in first-order logic; that is, the class K 1 of connected graphs is not -elementary 1 suppose K 1 = Mod(H) for set of sentences H 2 set B n, n 2 as x = y x 1 x n 2 R(x, x 1 ) R(x n 2, y) 3 m, H { B n 2 n m} has a model, but H { B n 2 n} is unsatisfiable 4 contradiction to compactness Answer infinite set of formulas are not enough finiteness is not expressible in first-order logic GM (Institute of Computer Science @ UIBK) Computational Logic 151/163 second-order formulas are defined as follows 1 first-order formulas are second-order formula 2 if t 1,, t n are second-order terms, X an n-ary predicate variable, then X (t 1,, t n ) is a second-order formula 3 If A(f ) is a second-order formula, f a function constant, u a function variable, then u A(u) are second-order formulas u A(u) 4 if A(P) a formula, P a predicate constant, X a predicate variable, then X A(X ) X A(X ) are second-order formulas 5 a second-order formula without predicate and function variables is first-order GM (Institute of Computer Science @ UIBK) Computational Logic 152/163 GM (Institute of Computer Science @ UIBK) Computational Logic 153/163

let u denote a function variable, X a predicate variable x f (x) = x u x u(x) = x 1 the first formulas expresses a property of the identity function 2 the 2nd asserts existence of an identity function consider x = y (P(x) P(y)) x = y X (X (x) X (y)) 1 the first formulas expresses a property of equality 2 the 2nd asserts defines equality Second-Order Interpretation a second-order environment l for A is a mapping l: {{x n n N} A} {{u i n i, n N} (A i A)} {{V i n i, n N} A i } l{x A } maps X to relation A A n if X is n-ary; all other maps are unchanged; similarly for function variables a second-order interpretation I is a pair (A, l) such that A is a structure l is a second-order environment GM (Institute of Computer Science @ UIBK) Computational Logic 154/163 consider the structure A with domain N; l(u) = succ and l(x) = 0 and let I = (A, l) the value of a second-order term t: l(t) t I c A = f A (t1 I,, ti n ) l(u)(t1 I,, ti n ) u(x) I = succ(0) = 1 if t an individual variable if t = c if t = f (t 1,, t n ), f a function constant if t = u(t 1,, t n ), u a function variable GM (Institute of Computer Science @ UIBK) Computational Logic 155/163 Satisfaction relation I = (A, l) an interpretation; F a formula I = P(t 1,, t n ) : if (t1 I,, tn I ) P A I = F : if I = F I = F G : if I = F or I = G I = x F (x) : if I{x a} = F (x) holds for all a A I = x F (x) : if I{x a} = F (x) holds for some a A I = X (t 1,, t n ) : l(x ) = A and (t1 I,, tn I ) A I = X F (X ) : if I{X A } = F (X ) for all A A n I = X F (X ) : if I{X A } = F (X ) for some A A n I = u F (u) : if I{u f } = F (u) for all f : A n A I = u F (u) : if I{u f } = F (u) for some f : A n A GM (Institute of Computer Science @ UIBK) Computational Logic 156/163 GM (Institute of Computer Science @ UIBK) Computational Logic 157/163

Reachability The Bad News Reachability is Expressible in let G be a structure defined over the language L = {R} with the domain G R represents the (directed) edge relation of the graph G consider the second order formula F (x, y) P ( z 1 z 2 z 3 ( P(z1, z 1 ) (P(z 1, z 2 ) P(z 2, z 3 ) P(z 1, z 3 ))) z 1 z 2 ((P(z 1, z 2 ) z 3 (P(z 1, z 3 ) P(z 3, z 2 )) R(z 1, z 2 ) ) P(x, y) ) suppose I = F (x, y), then path in G from l(x) to l(y) The Bad News Recall first-order logic admits the following theorems compactness Löwenheim-Skolem completeness Theorem 1 compactness fails for second-order logic 2 Löwenheim-Skolem fails for second-order logic 3 a calculus that is complete for second-order logic, in particular the set of valid second-order sentences is not recursively enumerable GM (Institute of Computer Science @ UIBK) Computational Logic 158/163 GM (Institute of Computer Science @ UIBK) Computational Logic 159/163 Let K be a set of finite structures and let F be a (second-order) sentence suppose M is a (second-order) structure in K then the F K problem asks, whether M = F holds (existential second-order formula ( SO)) we call a second-order formula F existential if F has the following form: X 1 X 2 X n G where G is essentially a first-order formula that may contain the free second-order variables X 1,, X n Lemma ➀ if F is SO, then the F K problem is in NP Lemma ➁ if F K is decidable by a NTM M that runs in polynomial time then F is equivalent to an existential second-order sentence Theorem (Fagin s Theorem) 1 a sentence F is equivalent to a sentence in SO iff F K NP 2 if F K NP, then it can be assumed that the first-order part of F is a universal formula 1 suppose F is an existential second-order sentence; by Lemma ➀, F K NP 2 suppose F K NP; NTM N that decides F K 3 by Lemma ➁, F is equivalent to an SO-formula G 4 the proof of the second lemma even yields that the first-order part of G is universal GM (Institute of Computer Science @ UIBK) Computational Logic 160/163 GM (Institute of Computer Science @ UIBK) Computational Logic 161/163

SAT is NP-complete (wrt the polytime reducibility relation) 1 SAT NP follows from Lemma ➀, as SAT can be easily encoded as SO-formula 2 thus let A NP 3 by Fagin s theorem, there exists an SO-formula F and some finite structures K, such that A is equivalent to the F K problem; moreover the first-order part of F is univeral 4 let M K be a finite; the universal part of F can be represented as propositional formula B 5 any interpretation of F is conceivable as an assignment of B (and vice versa) 6 thus A is reducible to a SAT problem GM (Institute of Computer Science @ UIBK) Computational Logic 162/163 Last Slide the following is equivalent: NP = conp and SO is equivalent to (full) second-order logic 1 any problem in conp is representable as SO formula 2 thus, if NP = conp, then SO SO 3 hence, SO would be closed under negation and thus equivalent to full second-order logic We leave it to the reader to verify and expand upon the claims in this section and to resolve the problems whether P = NP = conp (Shawn Hedman, A First (sic!) Course in GM (Institute Logic) of Computer Science @ UIBK) Computational Logic 163/163