Syntax and Semantics. The integer arithmetic (IA) is the first order theory of integer numbers. The alphabet of the integer arithmetic consists of:

Similar documents
Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

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

CS21 Decidability and Tractability

03 Review of First-Order Logic

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

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

A Simple Proof of Gödel s Incompleteness Theorems

Informal Statement Calculus

CS156: The Calculus of Computation

2.2 Lowenheim-Skolem-Tarski theorems

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

1.5 Non-linear Real Arithmetic

Propositional and Predicate Logic - XIII

Hilbert s problems, Gödel, and the limits of computation

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

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

Chapter 1 : The language of mathematics.

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

Defining Valuation Rings

Handbook of Logic and Proof Techniques for Computer Science

Hilbert s problems, Gödel, and the limits of computation

Lecture 1: The arithmetic hierarchy

... The Sequel. a.k.a. Gödel's Girdle

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

CS156: The Calculus of Computation Zohar Manna Winter 2010

First Order Logic (FOL) 1 znj/dm2017

MODEL THEORY FOR ALGEBRAIC GEOMETRY

In addition to this being the centenary of Kurt

THE CONSTRUCTIVE SECOND NUMBER CLASS*

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

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

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

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

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Definability in fields Lecture 1: Undecidabile arithmetic, decidable geometry

Lecture Notes. Advanced Discrete Structures COT S

Predicate Logic: Sematics Part 1

Lecturecise 22 Weak monadic second-order theory of one successor (WS1S)

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

SOCRATES DID IT BEFORE GÖDEL

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Gödel s Proof. Henrik Jeldtoft Jensen Dept. of Mathematics Imperial College. Kurt Gödel

Fuzzy and Rough Sets Part I

the logic of provability


Logic: The Big Picture

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

258 Handbook of Discrete and Combinatorial Mathematics

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

Marie Duží

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

From Constructibility and Absoluteness to Computability and Domain Independence

Classical Propositional Logic

Chapter 2 Algorithms and Computation

Automata Theory for Presburger Arithmetic Logic

Axiomatic set theory. Chapter Why axiomatic set theory?

DEFINABILITY AND DECISION PROBLEMS IN ARITHMETIC

The Syntax of First-Order Logic. Marc Hoyois

Flat Parametric Counter Automata

Review of Propositional Calculus

Satisfiability Modulo Theories (SMT)

Decidability: Church-Turing Thesis

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Decidability of Sub-theories of Polynomials over a Finite Field

The Mathematical Gazette

CMPS 217 Logic in Computer Science. Lecture #17

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

Constructions of Models in Fuzzy Logic with Evaluated Syntax

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Deciding Presburger Arithmetic

Statements, Implication, Equivalence

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

CSE 1400 Applied Discrete Mathematics Proofs

CS156: The Calculus of Computation

Arithmetical Hierarchy

An Intuitively Complete Analysis of Gödel s Incompleteness

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Axioms for Set Theory

Arithmetical Hierarchy

Generic cuts in models of Peano arithmetic

Mathematical Induction

Church s undecidability result

Chapter 3. Formal Number Theory

Solutions to Problem Set 1

Logic, Resolution and Prolog

Lecture 1: Logical Foundations

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

Herbrand Theorem, Equality, and Compactness

Countifiers. Kamal Lodaya Joint work with A V Sreejith. 50 years of IMSc

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

5. Peano arithmetic and Gödel s incompleteness theorem

CST Part IB. Computation Theory. Andrew Pitts

Panu Raatikainen THE PROBLEM OF THE SIMPLEST DIOPHANTINE REPRESENTATION. 1. Introduction

Part IA Numbers and Sets

Part II Logic and Set Theory

On Modal Systems with Rosser Modalities

A Generalization of Cobham s Theorem to Automata over Real Numbers 1

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Transcription:

Integer Arithmetic

Syntax and Semantics The integer arithmetic (IA) is the first order theory of integer numbers. The alphabet of the integer arithmetic consists of: function symbols +,,s (s is the successor function n n + 1) constant symbol 0 The semantics of IA is defined in the structure Z = Z,+,,n n + 1.

Examples Ex: Write a formula pos(x) that holds if and only if x 0 The order relation is defined as x y : z. pos(z) x + z = y The set of even numbers is defined by even(x) : y. x = y + y The divisibility relation is defined as x y : z. y = x z

Examples The set of prime numbers is defined by prime(x) : y z. x = y z (y = 1 z = 1) The least common multiple is defined as z = lcm(x,y) : t. x t y t z t Goldbach s Conjecture x. 2 x even(x) y z. prime(y) prime(z) x = y + z

Peano Arithmetic An axiomatic theory is a set of formulae in which truth is derived from a (possibly infinite) set of axioms, e.g. Euclid s geometry is an axiomatic theory. 1. 0 s(x) 2. s(x) = s(y) x = y 3. x + 0 = x 4. x + s(y) = s(x + y) 5. x 0 = 0 6. x s(y) = x y + x 7. ϕ(0) x. [ϕ(x) ϕ(s(x))] x. ϕ(x) Notice that the last point defines an infinite number of axioms.

Undecidability of Integer Arithmetic Follows directly from Gödel s Incompletness Theorem: Kurt Gödel. Uber formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I. Monatshefte für Mathematik und Physik, 38:173 198, 1931. Alonzo Church. An unsolvable problem of elementary number theory. American Journal of Mathematics, 58:345 363, 1936.

Undecidability of Integer Arithmetic The quantifier-free fragment is also undecidable: Yuri Matiyasevich. Enumerable sets are diophantine. Journal of Sovietic Mathematics, (11):354 358, 1970. Undecidability of Hilbert s Tenth Problem: Given a Diophantine equation with any number of unknown quantities and with rational integral numerical coefficients: To devise a process according to which it can be determined in a finite number of operations whether the equation is solvable in rational integers.

Undecidability of Integer Arithmetic Undecidability of the arithmetic of addition and divisibility: z = lcm(x,y) : t. x t y t z t x 2 = lcm(x,x + 1) x 4 x y = (x + y) 2 (x y) 2 Consequently, the arithmetic of addition and least common multiple square function are undecidable.

Presburger Arithmetic

Definition PA is the additive theory of natural numbers N,0,s,+ PA is decidable Mojzesz Presburger. Über die Vollstandigkeit eines gewissen Systems der Arithmetik. Comptes rendus du I Congrès des Pays Slaves, Warsaw 1929.

Examples Even/Odd: even(x) : y. x = y + y odd(x) : y. even(y) x = s(y) Order: x y : z. x + z = y Zero/One: zero(x) : y. x y one(x) : z. zero(z) x = z y. y = z x y Modulo constraints: x m y : z. (x y y x = mz) (x > y x y = mz)

Quantifier Elimination in PA A theory admits quantifier elimination if any formula of the form Q 1 x 1...Q n x n. φ(x 1,...,x n,y 1,...,y m ) is equivalent (modulo the theory) to a quantifier-free formula ψ(y 1,...,y m ). We consider the (equivalent) theory of addition and modulo constraints x m y : z. (x y y x = mz) (x > y x y = mz) Given a PA formula x. φ(x,y 1,...,y m ), we build an equivalent formula ψ(y 1,...,y m ) in the new language (with modulo constraints)

Quantifier Elimination in PA 1. Eliminate the negations replace (t 1 = t 2 ) by t 1 < t 2 t 2 < t 1, replace (t 1 < t 2 ) by t 1 = t 2 t 2 < t 1, and replace (t 1 m t 2 ) by m 1 i=1 t 1 m t 2 + i. Then rewrite the formula into DNF, i.e. a disjunction of x. β 1... β n, where each β i is one of the following forms: nx = u t nx m u t nx < u t u t < nx

Quantifier Elimination in PA 2. Uniformize the coefficients of x Let p be the least common multiple of the coefficients of x. Multiply each atomic formula containing nx by p n. In particular, nx m u t becomes px p n m p n (u t).

Quantifier Elimination in PA Eliminate the coefficients of x Replace all over the formula px by x and add the new conjunct x p 0 Special case If x = u t occurs in the formula, eliminate directly x by replacing it with u t.

Quantifier Elimination in PA Assume x = u t does not occur. We have a formula of the form x. l r j s j < x k x < t i u i n x mi v i w i j=1 i=1 i=1 Let M = [m i ] n i=1. The formula is equivalent to: M [ l ( k (r j s j ) + q < t i u i q=1 i=1 j=1 n )] (r j s j ) + q mi v i w i i=1

Example x. 1 < x x < 100 x 2 1 x 3 2 x [2,99] x 2 1 : 3 5 7 9 11 13 15 17... x [2,99] x 3 2 : 2 5 8 11 14 17... 6 ( 1 + q < 100 1 + q 2 1 1 + q 3 2 ) q=1

Decidability of PA The result quantifier elimination in a Presburger formula is equivalent to a disjunction of conjunctions of atomic propositions of the following forms: n a i x i + b 0 i=1 n a i x i + b n i=1 m If all quantifiers are eliminated from a formula with no free variables, the result is either true of false.

Semilinear Sets

Preliminaries Let x,y N n, for some n > 0 x = x 1, x 2,..., x n y = y 1, y 2,..., y n We define the following operations: x + y = x 1 + y 1, x 2 + y 2,..., x n + y n ax = ax 1, ax 2,..., ax n, a N x y x 1 y 1 x 2 y 2... x n y n

Preliminaries Lemma 1 Each set of pairwise incomparable elements of N n is finite. In consequence, each set M N n has a finite number of minimal elements. A strict order is called well-founded if there are no infinite descending chains x 1 x 2... For example, < is well-founded on N n. Principle 1 (Well-founded Induction) Let W, be a well-founded set, and P a property of the elements of W. If both the following hold: 1. P is true for all minimal elements of W, 2. for all x W: if P(y) is true for all y x then P(x) is true then, for all x W, P(x) is true.

Linear Sets L(C,P) = {c + p 1 +... + p m c C, p 1,...,p m P } for some C,P N n C = set of constants (bases) P = set of periods (generators) An element x L(C,P) is of the form x = c + m i=1 λ ip i, where c C, λ i N and p i P, for all 1 i m. A set M N n is said to be linear if M = L({c},P) where: c N n P N n is finite

Examples L({(1,0)}, {(1,2), (3,2)}) = {(2,2),(4,2),(3, 4), (5, 4),(7, 4),...} {(x,y) x 1} = L({(1,0)}, {(1,0), (0, 1)})

Semilinear Sets A set S is semilinear if it is a finite union of linear sets. Example 1 L(C,P) is semilinear iff C,P N n are finite. A function f : N n N m is said to be linear if for all x,y N n we have f(x + y) = f(x) + f(y). Lemma 2 If M N m is a semilinear set and f : N m N n is a linear function, m,n > 0, then f(m) is a semilinear set. Lemma 3 If M N m is a semilinear set and c N m, then the set c + M = {c + x x M} is semilinear.

Counterexample M = {(x,y) y x 2 } is not semilinear Suppose M = k i=1 L(c i,p i ) Let m = max{ y x (x,y) k i=1 P i} Take x 1,x 2 > m. The slope of the line connecting (x 1,x 2 1 ) and (x 2,x 2 2 ) is x 1 + x 2 > 2m > m. Hence at most one of (x 1,x 2 1 ), (x 2,x 2 2 ) can be generated by P i,i = 1,...,k, contradiction.

Closure Properties of Semilinear Sets Theorem 1 The class of semilinear subsets of N n, n > 0 is effectively closed under union, intersection and projection. The most difficult is to show closure under intersection. It is enough to show that the intersection of two linear sets is semilinear.

Closure Properties of Semilinear Sets Let M = L(c, {p 1,...,p k }) and M = L(c, {p 1,...,p l }). k l A = { λ 1,...,λ k,µ 1,...,µ l c + λ i p i = c + µ j p j} i=1 j=1 k l B = { λ 1,...,λ k,µ 1,...,µ l λ i p i = µ j p j, λ i > 0, µ j > 0} i=1 j=1 f( λ 1,...,λ k,µ 1,...,µ l ) = k λ i p i i=1 f is a linear function, and M M = c + f(a). It is enough to prove that A is semilinear.

Closure Properties of Semilinear Sets Let C, P be the sets of minimal elements of A, B. Proposition 1 Each element of B is a sum of elements of P. By well-founded induction. If x B is a minimal element, then x P. Else, x = λ 1,...,λ k,µ 1,...,µ l has a minimal element x = λ 1,...,λ k,µ 1,...,µ l P s.t. x < x. k λ i p i = i=1 k λ ip i = i=1 k (λ i λ i)p i = i=1 l µ j p j j=1 l µ jp j j=1 l (µ j µ j)p j j=1

Closure Properties of Semilinear Sets Hence x = λ 1 λ 1,...,λ k λ k,µ 1 µ 1,...,µ l µ l B Since x < x, we can apply the induction hypothesis. Since x = x + x, we conclude.

Closure Properties of Semilinear Sets Proposition 2 A = L(C,P) For each x = λ 1,...,λ k,µ 1,...,µ l A \ C there exists x = λ 1,...,λ k,µ 1,...,µ l C such that x < x. It is enough to show that x x B: k k k (λ i λ i)p i = λ i p i λ ip i i=1 i=1 = (c c) + i=1 l µ j p j [ (c c) + j=1 l = (µ j µ j)p j j=1 l j=1 µ jp ] j

Semilinear sets = Presburger-definable sets Theorem 2 (Ginsburg-Spanier) The class of semilinear subsets of N n coincides with the class of Presburger definable subsets of N n. M = n i=1 L({c i}, {p i1,...,p imi }) The formula defining M is the following: M(x) y 11... y nmn. n i=1 x = c i + m i j=1 y ij p ij

Semilinear sets = Presburger-definable sets Let φ(x 1,...,x k ) be a Presburger formula, i.e. a disjunction of conjunctions of atomic propositions of the following forms: n a i x i + b 0 i=1 n a i x i + b n i=1 Each atomic proposition describes a semilinear set, hence their intersections and unions are again semilinear sets. m