cs 1502 formal methods in computer science
DESCRIPTION
CS 1502 Formal Methods in Computer Science. Lecture Notes 13 Equivalences, Arguments, and Proofs involving Quantifiers. Propositional Logic. Tautology Tautological Consequence Tautological Equivalence. Based on the truth-functional Connectives. First-Order Logic. - PowerPoint PPT PresentationTRANSCRIPT
11
CS 1502 Formal Methods in CS 1502 Formal Methods in Computer ScienceComputer Science
Lecture Notes 13Lecture Notes 13Equivalences, Arguments, and Equivalences, Arguments, and
Proofs involving QuantifiersProofs involving Quantifiers
22
Propositional LogicPropositional Logic
TautologyTautology
Tautological ConsequenceTautological Consequence
Tautological EquivalenceTautological Equivalence
Based on thetruth-functional
Connectives
33
First-Order LogicFirst-Order Logic
Takes into consideration all of the truth-Takes into consideration all of the truth-functional connectives functional connectives (( ), ), the identity symbolthe identity symbol (=) (=), and the quantifiers , and the quantifiers ((x x y).y).
44
First-Order LogicFirst-Order Logic
FO ValidityFO Validity: a sentence that can’t be false: a sentence that can’t be falseFO Consequence:FO Consequence: applies to an argument applies to an argument whose conclusion can’t be made false whose conclusion can’t be made false when all of its premises are true.when all of its premises are true.FO EquivalenceFO Equivalence applies to a pair of applies to a pair of sentences that, in all possible sentences that, in all possible circumstances, have the same truth valuescircumstances, have the same truth values
55
FactsFacts
All All tautological consequencestautological consequences are are FO FO ConsequencesConsequences..
All All tautological equivalenciestautological equivalencies are are FO FO EquivalenciesEquivalencies..
66
FO ConsequenceFO Consequence
x [P(x) Q(x)] Q(b)
P(b)
QP
b
x [Tet(x) Large(x)] Large(b)
Tet(b)
A B
C
C is not a tautological consequence of A and B
77
Replacement MethodReplacement Method
This method is used to determine if a This method is used to determine if a sentence is an FO Validity and if an sentence is an FO Validity and if an argument is an FO Consequence.argument is an FO Consequence.
88
Replacement MethodReplacement Method
Replace all predicates in the sentence or in the Replace all predicates in the sentence or in the argument with symbolic ones making sure that if a argument with symbolic ones making sure that if a predicate appears more than once it is replaced with the predicate appears more than once it is replaced with the same symbolic name.same symbolic name.
See if you can describe a circumstance where the See if you can describe a circumstance where the sentence is false, if this is impossible then the sentence sentence is false, if this is impossible then the sentence is a FO Validity.is a FO Validity.
See if you can describe a circumstance where the See if you can describe a circumstance where the conclusion is false and the premises are all true. If this is conclusion is false and the premises are all true. If this is impossible, then the conclusion is an FO Consequence impossible, then the conclusion is an FO Consequence of its premises.of its premises.
99
DeMorgan’s Laws for QuantifiersDeMorgan’s Laws for Quantifiers
x P(x) x P(x) x [x [P(x)]P(x)]Nobody is P.Nobody is P.Everyone is not P.Everyone is not P.
x P(x) x P(x) x [x [P(x)]P(x)]It is not the case that everyone is P.It is not the case that everyone is P.Somebody is not P.Somebody is not P.
P
P
1010
Aristotelian Forms RevisitedAristotelian Forms Revisited
Negate: Negate: All P’s are Q’sAll P’s are Q’s..
~all x (P(x) ~all x (P(x) Q(x)) Q(x)) ~all x (~P(x) v Q(x)) ~all x (~P(x) v Q(x)) exist x (~(~P(x) v Q(x))) exist x (~(~P(x) v Q(x)))
exist x (P(x) ^ ~Q(x)) exist x (P(x) ^ ~Q(x))
Some P’s are not Q’sSome P’s are not Q’s
1111
A Special Form and its EquivalentA Special Form and its Equivalent
Only Q’s are P’sOnly Q’s are P’s
All P’s are Q’sAll P’s are Q’s
P
Q
1212
1313
Other Other EquivalencesEquivalences and and Non-Non-EquivalencesEquivalences (which are which?)(which are which?)
x [P(x) x [P(x) Q(x)] Q(x)] x P(x) x P(x) x Q(x)x Q(x)
x [P(x) x [P(x) Q(x)] Q(x)] x P(x) x P(x) x Q(x)x Q(x)
x [P(x) x [P(x) Q(x)] Q(x)] x P(x) x P(x) x Q(x)x Q(x)
x [P(x) x [P(x) Q(x)] Q(x)] x P(x) x P(x) x Q(x)x Q(x)
1414
Other EquivalencesOther Equivalences
x P x P P, where x is not free in P P, where x is not free in P
x P x P P, where x is not free in P P, where x is not free in P
x [P x [P Q(x)] Q(x)] P P x Q(x)x Q(x)
x [P x [P Q(x)] Q(x)] P P x Q(x)x Q(x)
x P(x) x P(x) y P(y) y P(y)
x P(x) x P(x) y P(y) y P(y)
1515
Proofs Involving QuantifiersProofs Involving Quantifiers
Universal EliminationUniversal Elimination
x S(x)x S(x) … …
S(c) S(c) Elim Elim
1616
ExampleExample
ProveProve
x Cube(x)x Cube(x) x Large(x)x Large(x)
Large(d) Large(d) Cube(d)] Cube(d)]
1717
1818
Proofs Involving Quantifiers
Universal Introduction c
…
S(c)
x S(x) Intro
Assume c is anarbitrary elementin the domain ofdiscourse.
1919
Example
Prove
x Cube(x) x Large(x)
x [Large(x) Cube(x)]
2020
2121
Proofs Involving Quantifiers
Existential Introduction
S(c) …
x S(x) Intro
2222
Example
Prove
Cube(e) Large(e) LeftOf(e,a) x [Cube(x) LeftOf(x,a)]
2323
2424
Proofs Involving Quantifiers
Existential Elimination x S(x)
c S(c)
…
Q
Q Elim
Since there exists an x such that S(x),
let c designate this object.
Symbol c cannot appear outside this
subproof!
2525
Example
Prove
x Large(x) x Cube(x)
x [Large(x) Cube(x)]
2626
2727
General Conditional Proof
Universal Introduction c P(c)
…
Q(c)
x [P(x) Q(x)] Intro
Assume c is anarbitrary elementin the domain ofDiscourse and assume P(c)
2828
Example
Prove
x [P(x) Q(x)] z [Q(z) R(z)]
x [P(x) R(x)]
2929