Professional Documents
Culture Documents
Lecture7 6up
Lecture7 6up
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 1/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 2/31
Motivation for semantic argument method Semantic Argument Method to Prove Validity
I So far, defined what it means for FOL formula to be valid, but I Recall: Semantic argument method is a proof by
how to prove validity?
contradiction.
I Will extend semantic argument method from PL to FOL I Basic idea: Assume that F is not valid, i.e., there exists some
I
S , σ such that S , σ 6|= F
Recall: In propositional logic, satisfiability and validity are
dual concepts: I Then, apply proof rules.
F is valid iff ¬F is unsatisfiable
I If can derive contradiction on every branch of proof, F is valid.
I Since this duality also holds in FOL, we’ll focus on validity
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 3/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 4/31
I All proof rules from prop. logic carry over but need new rules
for quantifiers.
I Universal elimination II:
I Universal elimination I:
U , I , σ 6|= ∀x .F (for a fresh o ∈ U )
U , I , σ |= ∀x .F (for any o ∈ U ) U , I , σ[x 7→ o] 6|= F
U , I , σ[x 7→ o] |= F
I By a fresh object constant, we mean an object that has not
I Example: Suppose U , I , σ |= ∀x .hates(jack , x ) been previously used in the proof
I Using the above proof rule, we can conclude: I Why do we have this restriction?
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 5/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 6/31
1
Existential Elimination Rule 1 Existential Elimination Rule II
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 7/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 8/31
I Finally, we need a rule for deriving for contradicitons F : (∀x .p(x )) → (∀y.p(y))
I Contradiction rule: I We start by assuming it is not valid, i.e., there exists some
S , σ such that S , σ 6|= F .
U , I , σ |= p(s1 , . . . , sn )
U , I , σ 6|= p(t1 , . . . , tn )
(I , σ)(si ) = (I , σ)(ti ) for all i ∈ [1, n]
U , I , σ |= ⊥
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 9/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 10/31
I Or if q(x ) does not hold for some object o, then p(x ) must
hold for that object o (i.e, ∃x .p(x ))
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 11/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 12/31
2
Example 3 Example 4
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 13/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 14/31
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 15/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 16/31
1. P halts and says “yes” if the answer is positive 2. P may not terminate if the answer is negative
2. halts and says “no” if the answer is negative I Thus, there exists an algorithm that always terminates and
says if any arbitrary FOL formula is valid
I But, what about the completeness result? Doesn’t this
contradict undecidability? I But no algorithm is guaranteed to terminate if the FOL
formula is not valid
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 17/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 18/31
3
Decidable Fragments of First-Order Logic Quantifier-Free Fragment of FOL
I Bernays-Schönfinkel class
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 19/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 20/31
I Pure monadic FOL: all predicates are monadic (i.e., arity 1) I The Bernays-Schönfinkel class is a fragment of FOL where:
and no function constants.
1. there are no function constants,
I Impure monadic FOL: both monadic predicates and monadic
function constants allowed 2. only formulas of the form:
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 21/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 22/31
I A logic is called compact if an infinite set of sentences Γ is I Compactness can be used to show that a variety of interesting
satisfiable iff every finite subset of Γ is satisfiable. properties are not expressible in first-order logic.
I Theorem (due to Gödel): First-order logic is compact. I For instance, we can use compactness theorem to show that
transitive closure is not expressible in first order logic.
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 23/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 24/31
4
Transitive Closure “Expressing” Transitive Closure in FOL
I At first glance, it looks like transitive closure T of binary
I Given a directed graph G = (V , E ), the transitive closure of
G is defined as the graph G ∗ = (V , E ∗ ) where: relation p is expressible in FOL:
E ∗ = {(n, n 0 ) | if there is a path from vertex n to n0 } ∀x , ∀z .(T (x , z ) ↔ (p(x , z ) ∨ ∃y.p(x , y) ∧ T (y, z )))
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 25/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 26/31
I For contradiction, suppose transitive closure is expressible in Ψn = ¬∃x1 , . . . . xn−1 .(p(a, x1 ) ∧ p(x1 , x2 ) ∧ . . . ∧ p(xn−1 , b))
first order logic
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 27/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 28/31
1. Since Γ encodes that T is transitive closure of p, T (a, b) says I By the compactness theorem, this would imply Γ0 is also
there is some path from a to b satisfiable
2. The infinite set of propositions Ψ1 , Ψ2 , . . . say that there is no I But we just showed that Γ0 is unsatisfiable!
path of any length from a to b
I Thus, transitive closure cannot be expressed in FOL!
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 29/31 Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 30/31
5
Summary
Işıl Dillig, CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL 31/31