Xiaokang Qiu x1 y1 while xx 2 yy 1 Q is x y gt2 always true Q Are these formulae valid in arithmetic FirstOrder Theories Q Which statements are true in arithmeticsettheorygroupsfields ID: 717278
Download Presentation The PPT/PDF document "Lecture 4 First-Order Theories" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Lecture 4 First-Order Theories
Xiaokang QiuSlide2
x=1;y=1;while (*) {
x=x+2;
y=y+1;}
Q: is x+y>=2 always true?
Q: Are
these formulae valid in arithmetic?Slide3
First-Order Theories
Q: Which statements are true in arithmetic/set-theory/groups/fields?
A
theory is a set of FOL sentences in a FO languageFix a language for arithmetic:
(why no ?)
How to define a theory?Fix a standard model: (or ?)Peano Arithmetic: Theory of PA: Another way to define a theoryFix a set of axioms , then
Slide4
First-Order Theories
Other theories?
Presburger
Arithmetic:
Integers:
Reals: Rationals: Arrays: Slide5
First-Order Theories
Definition:
A theory
is computably
axiomatizable (recursively enumerable) if:There is a computable set of axioms
Theorem: is computably axiomatizable iff. is decidable.Why? Slide6
Which theories are decidable?
Decidable theories
:
double exponential
:
triple exponential: double exponential: double exponential (P if quantifier-free)Quantifier-free : NP-completeQuantifier-free equality (plain FOL): NP-completeUndecidable theories
(
Gödel’s
Incompleteness Theorem, 1931)
(Tarski-
Mostowski
, 1949)
Theory of Rings
(
Mal'cev
, 1961)
Set Theory
(Tarski, 1949)
Slide7
Peano Arithmetic
Gödel’s Incompleteness Theorem (1931):
is not computably
axiomatizable
. Proof: Intuitively, is expressive enough to say “I am a liar.” (Russel’s Paradox)
Gödel number: Encode every formula to a number Encode every proof to is a proof of iff.
iff
. “the formula encoded by
is not provable”
There is a sentence
Slide8
Decision Procedures for Various TheoriesSlide9
Quantifier Elimination
Definition:
A set of formulas
admits quantifier elimination if for any formula
, there is a quantifier free
such that .Theorem: admits quantifier elimination.Theorem: admits quantifier elimination.E.g.,
Slide10
Rational Arithmetic QE
Step 1: Normalization
Convert
to Negation Normal Form (NNF)Step 2: Remove Negation
Step 3: Solve for
in Collect all terms compared to , e.g.,
Instantiate
in
with all possible
,
and
Slide11
Examples:
Slide12
Solving QF Rational Arithmetic
Solve satisfiability of
Each conjunction is
Just linear programming!
LP is solvable in
(weakly) polynomial timeTheorem: is decidable in double exponential time. Slide13
Theory of Equality
is interpreted (reflexivity, symmetry, transitivity, congruence)
Other functions/predicates are
uninterpreted
Congruence:
Theory of Equality is undecidable
Why?
Slide14
Theory of Equality
Theorem:
The theory of equality is QF-decidable and NP-complete.
Idea: build the set of sub-terms and guess the equality between them.
Example:
Guess equivalence classes, e.g.,
Check congruence and
Slide15
Satisfiability Modulo TheoriesSlide16
How to combine decidable theories?
is a decidable theory over
is a decision procedure for
is a decidable theory over
is a decision procedure for
Can we build a decision procedure for
from
and
?
Slide17
Example
is decidable
is QF-decidable
Is satisfiable in ? The combined theory is undecidable in general!Slide18
Nelson-Oppen Combination
Theorem (1979):
If
is a QF-decidable theory over
is a QF-decidable theory over
Both and are stably infinite (intuitively, both theories have infinite models)then is QF-decidable!Combinable theories:
+ Equality +
Slide19
Nelson-Oppen Combination
Step 1: Purification
Split an
-formula
into an
-formula and an -formula such that and are equisatisfiableExample:
Slide20
Nelson-Oppen Combination
Step 2: Guess and Check
and
should agree on the equality
between shared variables!
Guess an equality:
Solve the two theories separately!
(if both theories are in NP, so is the combined procedure)Slide21
Nelson-Oppen Combination
More efficient procedure exists if the theory is
convex
.Definition:
A theory is convex if for any in the theory, if
, then for some .The procedure becomes deterministic – no need to guess on equality! and are convex; and are not!E.g.,