Undecidability of the validity problem

Similar documents
0-1 Laws for Fragments of SOL

The Classical Decision Problem

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

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

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

Predicate Logic - Undecidability

There are problems that cannot be solved by computer programs (i.e. algorithms) even assuming unlimited time and space.

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

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

CMPS 217 Logic in Computer Science. Lecture #17

Informal Statement Calculus

Herbrand Theorem, Equality, and Compactness

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits

Theory Combination. Clark Barrett. New York University. CS357, Stanford University, Nov 2, p. 1/24

1 The decision problem for First order logic

Closure under the Regular Operations

Chapter 2 Algorithms and Computation

Propositional and Predicate Logic - XIII

(i) By Corollary 1.3 (a) on P. 88, we know that the predicate. Q(x, y, z) S 1 (x, (z) 1, y, (z) 2 )

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

Models of Computation, Recall Register Machines. A register machine (sometimes abbreviated to RM) is specified by:

In Class Problem Set #15

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.

Primitive recursive functions: decidability problems

(a) Definition of TMs. First Problem of URMs

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

6.8 The Post Correspondence Problem

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

Expressiveness, decidability, and undecidability of Interval Temporal Logic

CS154, Lecture 10: Rice s Theorem, Oracle Machines

Expansions with P = NP. Christine Gaßner Greifswald

CPSC 421: Tutorial #1

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM. Turing 1936

Gödel s Theorem: Limits of logic and computation

Register machines L2 18

INF3170 / INF4171 Notes on Resolution

Predicate Calculus - Undecidability of predicate calculus Moonzoo Kim CS Dept. KAIST

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

17.1 The Halting Problem

First-Order Logic (FOL)

16.1 Countability. CS125 Lecture 16 Fall 2014

Logic and Computation

Notes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013

Spectra and satisfiability for logics with successor and a unary function

CS156: The Calculus of Computation

Limits of Computability

Gödel s Incompleteness Theorem. Overview. Computability and Logic

About the relationship between formal logic and complexity classes

The Expressivity of Universal Timed CCP: Undecidability of Monadic FLTL and Closure Operators for Security

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

Gödel s Incompleteness Theorem. Part II: Arithmetical Definability. Computability and Logic

Description Logics: a Nice Family of Logics. Day 4: More Complexity & Undecidability ESSLLI Uli Sattler and Thomas Schneider

Logic: Propositional Logic Truth Tables

From Constructibility and Absoluteness to Computability and Domain Independence

Algorithmic Model Theory SS 2016

258 Handbook of Discrete and Combinatorial Mathematics

Lecture 16: Time Complexity and P vs NP

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

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

Mathematical Logic (IX)

Gödel s Incompleteness Theorem. Overview. Computability and Logic

Axiomatisation of Hybrid Logic

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

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.

First Order Logic (FOL)

Cellular automata, tilings and (un)computability

Classical First-Order Logic

5. Peano arithmetic and Gödel s incompleteness theorem

Next. Description Logics: a Nice Family of Logics. Some

1 Predicates and Quantifiers

4.2 The Halting Problem

6.5.3 An NP-complete domino game

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

An Introduction to Description Logics: Techniques, Properties, and Applications. NASSLLI, Day 3, Part 2. Computational Complexity.

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Final Exam (100 points)

The Complexity of Computing the Behaviour of Lattice Automata on Infinite Trees

Lecture Notes: The Halting Problem; Reductions

CSE 105 THEORY OF COMPUTATION

Logic: The Big Picture

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Introduction to Turing Machines. Reading: Chapters 8 & 9

Theory of Computation

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

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

Notes. Corneliu Popeea. May 3, 2013

Chapter 3. Formal Number Theory

CS156: The Calculus of Computation Zohar Manna Winter 2010

Friendly Logics, Fall 2015, Lecture Notes 1

Notes for Lecture Notes 2

CS481F01 Solutions 8

Gödel s Incompleteness Theorems

Arithmetic and Incompleteness. Will Gunther. Goals. Coding with Naturals. Logic and Incompleteness. Will Gunther. February 6, 2013

Real-time Logics Expressiveness and Decidability

Theorem 4.18 ( Critical Pair Theorem ) A TRS R is locally confluent if and only if all its critical pairs are joinable.

Lecture 2: Axiomatic semantics

CpSc 421 Homework 9 Solution

Finite Model Theory Unit 1

Transcription:

Undecidability of the validity problem We prove the undecidability of the validity problem for formulas of predicate logic with equality. Recall: there is an algorithm that given a formula of predicate logic with equality returns a sat-equivalent formula of predicate logic. It follows the validity problem for formulas of predicate logic with equality is also undecidable. 1

Goto-programs The proof is by reduction from the halting problem for goto-programs. Prog ::= l : Assign (assignment) l : goto l l : if x i 0 then goto l l : halt Prog ; Prog (unconditional jump) (conditional jump) (termination) (concatenation) Assign ::= x i := 0 x i := x j x i := x j + 1 x i := x j 1 l ::= 1 2 3... 2

Example 1: if x 1 = 0 then goto 4; 2: x 1 := x 1 1; 3: goto 1; 4: halt 3

Claim: goto-programs can simulate any program. By the claim: a problem is decidable if it is solved by some goto-program. We prove the following two theorems: Theorem: The halting problem for goto-programs is undecidable: There is no (goto-)program that takes as input a goto-program P and a valuation β of the variables of P and decides whether P initialized with β terminates. Theorem: If the validity problem is decidable, then the halting problem for goto-programs is decidable. 4

Coding Fact: Programs and valuations can be encoded as integers. Notations: P(a 1,...,a i ) denotes the Program P initialized with (a 1,...,a i, 0,...,0). I.e., variables x 1,...,x i are initialized with a 1,...,a i and variables x i+1,...,x n with 0. Π n denotes the program with code number n (if the program exists). 5

Computable encodings Fact: There exist computable encodings, i.e., encodings for which the following programs exist: Encoder. Input: a program P. Output: the code of P, i.e., the number n such that P = Π n. Decoder. Input: a number n. Output: the program Π n if n encodes a program, otherwise Not a program. 6

Assumption: There is a program T such that for every pair n,m N the initialized program T(n,m) halts and reports Not a program Yes No if n is not the code of a program if n is the code of a program and Π n (m) halts if n is the code of a program and Π n (m) does not halt We show that this assumption leads to a contradiction. 7

The contradiction Fact: The asumption implies the existence of a program T such that for every n N the initialized program T (n) halts does not halt if n is the code of a program and Π n (n) does not halt if n is not the code of a program or Π n (n) halts 8

Let k be the code of T, i.e., Π k = T. Either the initialized program T (k) halts, or it does not halt. But: T (k) halts k is the code of a program and Π k (k) does not halt (Def. of T ) T (k) does not halt (Π k = T ) T (k) does not halt Π k (k) halts (Def. von T, k is code) T (k) halts (Π k = T ) So the assumption is false. 9

Undecidability of the validity problem We assign to every program P and valuation β a formula φ Pβ of predicate logic with equality such that φ Pβ is valid if and only if P with initialization β halts There is a program that on input P,β outputs φ Pβ. So no program can solve the validity problem. 10

Notations and definitions Let k denote the number of instructions of P. (The last instruction is always halt.) Let n denote the number of variables of P. (I.e., the variables of P are x 1,...,x n.) A configuration of P is a tuple (pc,m 1,...,m n ) N n+1. pc is the current value of the program counter and m 1,...m n the current valuation of the variables. Convention: the successor of a configuration (l k,m 1,...,m n ) is again (l k,m 1,...,m n ). 11

Symbols of the formula φ Pβ R, predicate symbol of arity (n + 2). <, predicate symbol of arity 2. f, function symbol of arity 1. 0, constant. 12

Canonical structure A Universe: N. < A is the usual order on N. 0 A = 0. f A is the successor function, i.e., f A (n) = n + 1. R A (s,pc,m 1,...,m n ) = 1 if (pc,m 1,...,m n ) is the configuration of P after s steps (for the initialization β). 13

The auxiliary formula ψ Pβ ψ Pβ = ψ 0 R(0,β) ψ 1... ψ k 1 Meaning of R(0,β) in the structure A: P is initialized with β In the structure A the formula ψ i describes the effect of the i-th instruction of P. For instance: If i: x j := x j + 1 then ψ i = x y 1... y n ( R(x,f i (0),y 1,...y n ) R(f(x),f (i+1) (0),y 1,...y j 1,f(y j ),y j+1,...,y n ) ) 14

If i: if x j = 0 then goto j then ψ i = x y 1... y n ( R(x,f i (0),y 1,...y n ) ( y j = 0 R(f(x),f j (0),y 1,...,y n ) (y j = 0) R(f(x),f (i+1) (0),y 1,...,y n ) ) ) 15

ψ 0 guarantees that in every model the symbol < is interpreted as a total order, that 0 is its smallest element, that x < f(x) holds, and that f(x) is the <-successor of x: ψ 0 = x y(x < y (y < x)) x y z((x < y y < z) x < z) x(0 < x 0 = x) x(x < f(x)) x z(x < z (f(x) < z f(x) = z) 16

The formula φ Pβ We set φ Pβ = ψ Pβ x y 1... y n R(x,f k (0),y 1,...,y n ) Theorem: φ Pβ is valid iff program P with initialization β halts. Proof: ( ): If φ Pβ is valid, then in particular the canonical structure A is a model of φ Pβ. Since A = ψ Pβ clearly holds, we get A = x y 1... y n R(x,f k (0),y 1,...,y n ). So P initialized with β halts. 17

( ): (Sketch.) If φ Pβ is not valid, then there is a structure B = (U B,I B ) such that B = ψ Pβ and B = x y 1... y n R(x,f k (0),y 1,...,y n ). For every i 0 let d i be the element of U B such that (f i (0)) B = d i. Since B = ψ Pβ we have B = ψ 0, and so (why?): d 0 < B d 1 < B d 2..., d i = d j iff i = j, and for every d U B : if f B (d) = d i then d = d i 1. Let (pc,m 1,...,m n ) be the configuration of P after s steps (with initialization β). Since B = ψ Pβ we have R B (d s i,d Z i,d m 1i,...,d m 1n ) for every i 0. Since B = x y 1... y n R(x,f k (0),y 1,...,y n ), P does not terminate when initialized with β. 18

An alternative proof The tiling problem: Given: finite set of square tiles with fixed orientation and labelled borders: up, left, down, right. Each square is divided by its diagonals into four colored triangles. Question: Can the plane be tiled with the given tiles in such a way, that neighbouring triangles in different tles always have the same colour? Theorem: The tiling problem is undecidable. 19

The reduction We define for each set S of tiles a formula φ S that is satisfiable iff the plane can be tiled with S. Symbols: predicate symbol P s of arity 2 for each tile s S, function symbol f of arity 1. Canonical structure A: Universe: Z Z. f A is the successor function, i.e., f A (n) = n + 1. (i,j) P s if tile s occupies the square with coordinates (i,j). 20

The formula φ S Let H be the set of tile pairs (s,s ) s.t. s can be placed right from s. Let V be the set of tile pairs (s,s ) s.t. s can be placed above s. We take φ S = x y (F 1 F 2 ) where F 1 = (P s (x,y) P s (x,y)) s s F 2 = (P s (x,y) P s (f(x),y)) (s,s ) H (s,s ) V (P s (x,y) P s (x,f(y))) 21

Consequences Corollary: The satisfiability problem is undecidable for closed formulas of the form F = x y F. Corollary: The satisfiability problem is undecidable for closed formulas of the form F = x z y F, where F contains no function symbols. 22

Prefix classes We consider formulas in prenex form without function symbols. Undecidable classes: (Skolem, 1920) (Suranyi, 1959) (Kahr, Moore, Wang, 1962) Decidable classes: (Bernays, Schönfinkel, 1928) (Ackerman, 1928) 2 (Gödel 1932, Kalmar 1933, Schütte 1934) 23