Title: Formal Methods in Computer Science CS1502 FirstOrder Validity and Consequence
1Formal Methods in Computer ScienceCS1502First-O
rder Validity and Consequence
- Patchrawat Uthaisombut
- University of Pittsburgh
2Goals
- To learn about notion of tautology for
quantified sentences, and its use to capture the
notion of truth of quantified sentences. - truth-functional form and the algorithm to
construct it. - To learn about the notion of FO validity and
its use to capture the notion of truth of
quantified sentences. - FO validity, non FO validity, and FO
counterexample - To learn about the notion of FO consequence and
its use to capture the notion of logical
consequence of quantified sentences. - FO consequence, non FO consequence, and FO
counterexample
3Different Kinds of Truths
in propositional logic
- Tautologies
- boolean connectives
- Logical truths
- boolean connectives predicates
- Model-specific truths
- boolean connectives predicates restriction of
the model
4Different Kinds of Truths
in first-order logic
- Tautologies
- boolean connectives
- First-order validity
- boolean connectives quantifiers
- Logical truths
- boolean connectives quantifiers
predicates - Model-specific truths
- boolean connectives quantifiers
predicates restriction of the model. - Meaning of quantifiers
5Quantified sentences that are tautologies
- Truth-functional form
- Truth-functional form algorithm
6Essence of tautologies
- When we consider if a sentence is a tautology, we
follow these rules. - Consider the sentence as a structure consisting
of basic sentences (basic pieces) connected
by Boolean connectives. - Each basic piece has a truth value. Each
basic piece can be true or false (ignore
meaning of predicates, quantifiers in the basic
piece, restriction of the model.) - Two occurrences of the same basic pieces always
have the same truth value. - If all combinations of truth assignments to basic
pieces (all rows in truth table) yield TRUE for
the whole sentence, then the sentence is a
tautology.
7Example (propositional logic)
- Tet(a) \/ (Tet(a) \/ Small(b))
- Basic pieces Tet(a), Small(b)
- Two occurrences have the same truth value
- All rows are true, then its a tautology.
8Truth-Functional Form
- Decomposition of a sentence into basic
constituent parts that are still sentences (have
truth value). - ?x Tet(x) ? ?y (Cube(y) /\ ?z FrontOf(z,y))
- Truth-functional form A ? B
9Truth-Functional Form Algorithm
- Work left to right
- When encounter a quantifier or an atomic sentence
- Begin underline
- If it is a quantifier, underline the quantifier
and the wff that it applies to. - If it is an atomic sentence, underline the atomic
sentence. - End underline
- Give the underlined constituent a letter (A,B,C,
) - If an identical constituent already appears, use
same letter - Otherwise, use a new letter
- Repeat step 2 until then end of sentence
- Replace each underlined constituent with a letter
that labels it.
10Finding the truth-functional form
- Tet(a) /\ ((Tet(b) \/ ?x Cube(x)) ? Tet(b))
- A /\ ((B \/ C) ? B)
- ?x Large(x) /\ ?y(Tet(y) ? ?z LeftOf(y,z))
- A /\ B
B
C
B
A
A
B
11Exercises
- ?x (Tet(x) /\ Small(x))
- ?x Tet(x) /\ ?y Small(y)
- ?x ?y (Tet(x) /\ Small(y))
- (Tet(b) \/ ?x Tet(x)) ? ?x Tet(x)
- ?x (Tet(x) /\ ?y FrontOf(y,x)) ? (Tet(b) /\ ?z
FrontOf(z,b)
12Tautologies and Quantification
- A quantified sentence is a tautology if and only
if its truth-functional form is a tautology.
13Which of these sentences are tautologies?
- ?x Tet(x) \/ ?x Tet(x)
- ?x Tet(x) \/ ?y Tet(y)
- ?x (Tet(x) \/ Tet(x))
- ?x Tet(x) \/ ?x Tet(x))
- ?x (Tet(x) \/ Cube(x) \/ Dodec(x))
Tautology
FO validities. The meaning of quantifier is used
Not an FO validity, but a TW-necessity Even
though the meaning of quantifier is used, we
still cannot conclude that it is always true.
14Tautological Consequence
- Given an argument, how to determine that the
argument is tautologically valid? - Find the truth-functional form of each sentence
in the argument. - Then prove it.
15Which of these are tautologically valid?
- ?x Tet(x) ? ?x Small(x))
- ?x Tet(x)
- ?x Small(x)
- ?x Tet(x)
- ?x Small(x)
- ?x (Tet(x) /\ Small(x))
- ?x Tet(x)
- ?x Small(x)
- ?x Tet(x) /\ ?x Small(x))
- ?x Tet(x)
- ?x Small(x)
- ?x (Tet(x) /\ Small(x))
A tautological consequence
A tautological consequence
Not a tautological consequence An FO consequence
Not valid
16Goals
- To learn about notion of tautology for
quantified sentences, and its use to capture the
notion of truth of quantified sentences. - truth-functional form and the algorithm to
construct it. - To learn about the notion of FO validity and
its use to capture the notion of truth of
quantified sentences. - FO validity, non FO validity, and FO
counterexample - To learn about the notion of FO consequence and
its use to capture the notion of logical
consequence of quantified sentences. - FO consequence, non FO consequence, and FO
counterexample
17First-Order validity (FO validity)
- FO validity
- Non FO validity
- FO counterexample
18Different Kinds of Truths
in first-order logic
- Tautologies
- boolean connectives
- First-order validity
- boolean connectives quantifiers
- Logical truths
- boolean connectives quantifiers
predicates - Model-specific truths
- boolean connectives quantifiers
predicates restriction of the model. - Meaning of quantifiers
19Terminology
20FO validity
- Tautology True solely in virtue of the meaning
of - the truth-functional connectives. /\, \/,
- (that is, not include the meanings of predicates)
- (not include the restriction of the model)
- FO validity True solely in virtue of the meaning
of - the truth-functional connectives /\, \/,
- the quantifiers ?, ?
- and the identity symbol.
- (that is, not include the meanings of predicates
besides identity symbols) - (not include the restriction of the model)
21FO validity
- A sentence is a first-order validity if a
sentence is true in any world without the need to
know the meaning of the predicates (other than
identity). - A sentence is a first-order validity if a
sentence is true in any world under any
interpretation of the predicates (except identity
which always means identity). - To help ourselves avoid interpreting the
predicates in particular ways, replace predicates
with nonsensical ones.
22Example
- ?x SameShape(x,x)
- Replace the predicate with nonsensical one.
- ?x SameShape(x,x) becomes ?x P(x,x)
- Interpret /\, \/, and ?, ?
- If P(x,y) means x has the same shape as y
- the sentence is true in any circumstance
- If P(x,y) means x is in the same row as y
- the sentence is true in any circumstance
- If P(x,y) means x is larger than y
- the sentence is not true in some circumstance.
- The sentence is false in some world under some
interpretation of the predicate. - Not an FO validity.
23Example
- ?x Tet(x) \/ ?x Tet(x)
- Replace the predicate with nonsensical one.
- ?x Tet(x) \/ ?x Tet(x) becomes ?x K(x) \/ ?x
K(x) - Interpret /\, \/, and ?, ?
- If K(x) means x is a tetrahedron
- the sentence is true in any circumstance
- If K(x) means x is a great movie
- the sentence is true in any circumstance
- In fact, no matter what K(x) means, the sentence
?x K(x) \/ ?x K(x) is always true. - The sentence is true in any world under any
interpretation of the predicate. - (The sentence is true and in any world without
the need to know the meaning of the predicate ). - FO validity.
24Which of these are FO validities?
- ?x Small(x) ? Small(b)
- (Tet(a) /\ ad) ? Tet(d)
- (FrontOf(a,b) /\ SameRow(a,c)) ? FrontOf(c,b)
25First-order counterexample
- FO validity
- For any circumstance and any interpretation of
the predicates, the sentence is true - Recall Showing non tautology
- Find truth assignment to atomic sentences
- Such that whole sentence is false
- Non FO validity
- For some circumstance and some interpretation of
the predicates, the sentence is false.
26Example of FO counterexample
- ?x SameShape(x,x)
- Replace the predicate with nonsensical one.
- ?x SameShape(x,x) becomes ?x P(x,x)
- Come up with a interpretation of the predicate
- P(x,y) means x is taller than y.
- Come up with a world (not necessarily Tarskis
world). - A world with 3 people John, James, Jack with
height 4, 5, 6 respectively. - Verify that the sentence is false under this
interpretation in this world. - P(John, John) is false. Thus, ?x P(x,x) is
false. - Not an FO validity.
27Exercise
- Come up with an FO counterexample to show that
the following sentence is not an FO validity. - ?x (FrontOf(x,a) ? BackOf(a,x))
28Goals
- To learn about notion of tautology for
quantified sentences, and its use to capture the
notion of truth of quantified sentences. - truth-functional form and the algorithm to
construct it. - To learn about the notion of FO validity and
its use to capture the notion of truth of
quantified sentences. - FO validity, non FO validity, and FO
counterexample - To learn about the notion of FO consequence and
its use to capture the notion of logical
consequence of quantified sentences. - FO consequence, non FO consequence, and FO
counterexample
29FO consequence
- FO consequence
- Non FO consequence
- FO counterexample
30FO Consequence
- Tautological consequence True solely in virtue
of the meaning of - the truth-functional connectives. /\, \/,
- (that is, not include the meanings of predicates)
- (not include the restriction of the worlds)
- FO consequence True solely in virtue of the
meaning of - the truth-functional connectives /\, \/,
- the quantifiers ?, ?
- and the identity symbol.
- (that is, not include the meanings of predicates
besides identity symbols) - (not include the restriction of the worlds)
31FO consequence
- Q is a first-order consequence of P1, P2, P3 if Q
always follows from P1, P2, P3 without the need
to know the meaning of the predicates (other than
identity). - Q is a first-order consequence of P1, P2, P3 if Q
always follows from P1, P2, P3 under any
interpretation of the predicates (except identity
which always means identity). - To help ourselves avoid interpreting the
predicates in particular ways, replace predicates
with nonsensical ones.
32- ?x (Tet(x) ? Small(x))
- _ Tet(a)
- Small(a)
- Replace the predicate with nonsensical one.
- ?x (Mida(x) ? Epo(x))
- _ Mida(a)
- Epo(a)
- Interpret /\, \/, and ?, ?
- The conclusion follows from the premises in any
world under any interpretation of the predicates. - (The conclusion follows from the premises in any
world without the need to know the meaning of the
predicates). - FO consequence.
33FO consequence?
- ?x Larger(a,x)
- ?x (xb ? Larger(x,b))
- Larger(a,b)
- ?x P(a,x)
- ?x (xb ? P(x,b))
- P(a,b)
?x Larger(x,a) ?x Larger(b,x) Larger(c,d) Larger
(a,b)
34First-order counterexample
- FO consequence
- For any circumstance and any interpretation of
the predicates, the conclusion follows from the
premises - Recall Showing non tautological consequence
- Find truth assignment to atomic sentences
- All premises are true
- Conclusion is false.
- Non FO consequence
- For some circumstance and some interpretation of
the predicates, the conclusion does not follow
from the premises
35First-Order Counterexample
- 1. Replace predicates
- 2. Define interpretation
- P(x,y) means x likes y
36Exercise
- Create a FO counterexample for this argument.
- ?x (FrontOf(x,a) ? Cube(x))
- Tet(b)
- FrontOf(b,a)
37Goals
- To learn about notion of tautology for
quantified sentences, and its use to capture the
notion of truth of quantified sentences. - truth-functional form and the algorithm to
construct it. - To learn about the notion of FO validity and
its use to capture the notion of truth of
quantified sentences. - FO validity, non FO validity, and FO
counterexample - To learn about the notion of FO consequence and
its use to capture the notion of logical
consequence of quantified sentences. - FO consequence, non FO consequence, and FO
counterexample