CS1502 Formal Methods in Computer Science
description
Transcript of CS1502 Formal Methods in Computer Science
11
CS1502 Formal Methods in CS1502 Formal Methods in Computer ScienceComputer Science
Lecture Notes 4Lecture Notes 4Tautologies and Logical TruthTautologies and Logical Truth
22
Constructing a Truth TableConstructing a Truth Table
Write down sentenceWrite down sentenceCreate the reference columnsCreate the reference columnsUntil you are done:Until you are done:– Pick the next connective to work onPick the next connective to work on– Identify the columns to considerIdentify the columns to consider– Fill in truth values in the columnFill in truth values in the column
EG: ~(A ^ (~A v (B ^ C))) v BEG: ~(A ^ (~A v (B ^ C))) v B(in Boole and on board)(in Boole and on board)
33
TautologyTautology
A sentence S is a A sentence S is a tautologytautology if and only if if and only if every row of its truth table assigns true to every row of its truth table assigns true to S.S.
44
ExampleExample
Is Is (A (A ( (A A (B (B C))) C))) B a tautology? B a tautology?
55
ExampleExample
66
Logical PossibilityLogical Possibility
A sentence S is A sentence S is logically possiblelogically possible if it could if it could be true (i.e., it is true in be true (i.e., it is true in somesome world) world)
It is It is TW-possibleTW-possible if it is true in if it is true in somesome world world that that can be built using the program can be built using the program
77
ExamplesExamples
Cube(b) Cube(b) Large(b) Large(b)
(Tet(c) (Tet(c) Cube(c) Cube(c) Dodec(c)) Dodec(c))
e e e e
Logically possible TW-possible
Not TW-possibleLogically possible
Not Logically possible
88
Spurious RowsSpurious Rows
A A spurious rowspurious row in a truth table is a row in a truth table is a row whose whose reference columnsreference columns describe a describe a situation or circumstance that is situation or circumstance that is impossibleimpossible to realize on logical grounds. to realize on logical grounds.
99
ExampleExampleP Q R
Cube(a) a=b Cube(b)T T TT T FT F TT F FF T TF T FF F T
Spurious!
Spurious!
1010
Logical NecessityLogical Necessity
A sentence S is a A sentence S is a logical necessitylogical necessity ((logicallogical truthtruth)) if and only if S is true in every logical if and only if S is true in every logical circumstance.circumstance.A sentence S is a A sentence S is a logical necessitylogical necessity ((logicallogical truthtruth)) if and only if S is true in every non- if and only if S is true in every non-spurious row of its truth table.spurious row of its truth table.
Logical-Necessity
TW-Necessity
1111
ExampleExample
a=b b=b a=b v b=bT T TT F TF T TF F F
Logical Necessity TW-NecessityNot a tautology
1212
ExampleExample
Larger(a,b) Smaller(a,b) Larger(a,b) v Smaller(a,b)T T T spuriousT F TF T TF F F
Not a TW-NecessityNot a Logical NecessityNot a tautology
According to the book, the first row is spurious, because a cannot be both larger and smaller than b. Technically, though, “Larger” and “Smaller” might mean anyrelation between objects. So, the first row is really only TW-spurious. This issuewon’t come up with any exam questions based on this part of the book. (The bookrefines this later.)
1313
Sentence Hierarchy
Tautologies
Logical Necessities
TW Necessities
Tet(b) Tet(b)
a=a
Tet(b) Cube(b) Dodec(b)
Cube(a) Small(a)
Cube(a) v Cube(b)
1414
Tautological EquivalenceTautological Equivalence
Two sentences Two sentences SS and and SS’ are’ are tautologically tautologically equivalentequivalent if and only if every row of their if and only if every row of their joint truth table assigns the same values to joint truth table assigns the same values to SS and and S’S’..
1515
ExampleExample
S and S’ are Tautologically Equivalent
P Q P --> Q ~P v QT T T TT F F FF T T TF F T T
S S’
1616
Logical EquivalenceLogical Equivalence
Two sentences S and S’ are Two sentences S and S’ are logically logically equivalentequivalent if and only if every non-spurious if and only if every non-spurious row of their joint truth table assigns the row of their joint truth table assigns the same values to S and S’.same values to S and S’.
1717
ExampleExample
Not Tautologically equivalent Logically Equivalent
a=b Cube(a) Cube(b) a=b ̂Cube(a) a=b ̂Cube(b)T T T T TT T F T FT F T F TT F F F FF T T F FF T F F FF F T F FF F F F F
S S’
1818
Tautological ConsequenceTautological Consequence
Sentence Sentence QQ is a is a tautological consequencetautological consequence of of PP11, P, P22, …, P, …, Pnn if and only if every row that if and only if every row that assigns true to all of the premises also assigns true to all of the premises also assigns true to assigns true to QQ..Remind you of anything?Remind you of anything?P1,P2,…,PnP1,P2,…,Pn | | QQ is also a valid argument!is also a valid argument!A Con Rule:A Con Rule: Taut Tautological ological ConConsequencesequence
1919
Example Example
P Q P v Q ~Q PT T T F TT F T T TF T T F FF F F T F
Tautological consequence
premises conclusion
2020
Logical ConsequenceLogical Consequence
Sentence Sentence QQ is a is a logical consequencelogical consequence of of PP11, P, P22, …, P, …, Pnn if and only if if and only if every non-every non-spuriousspurious rowrow that assigns true to all of the that assigns true to all of the premises also assigns true to premises also assigns true to QQ..
2121
a=b b=c a=c a=b ̂b=c a=cT T T T TT T F T FT F T F TT F F F FF T T F TF T F F FF F T F TF F F F F
Not a tautological consequence
Is a logical consequence
premise conclusion
2222
SummarySummaryNecessaryNecessary
S is always trueS is always true
PossiblePossible
S could be trueS could be true
EquivalenceEquivalence
S and S’ always S and S’ always have the same have the same truth valuestruth values
ConsequenceConsequence
Whenever Whenever P1…Pn are P1…Pn are true, Q is also true, Q is also truetrue
TautologicalTautologicalAll rows in truth All rows in truth tabletable
S is a tautologyS is a tautology S is S is Tautologically Tautologically possiblepossible
S and S’ are S and S’ are Tautologically Tautologically equivalentequivalent
Q is a Q is a tautological tautological consequence of consequence of P1…PnP1…Pn
LogicalLogicalAll non-spurious All non-spurious rowsrows
S is logically S is logically necessary necessary (logical truth)(logical truth)
S is logically S is logically possiblepossible
S and S’ are S and S’ are logically logically equivalentequivalent
Q is a logical Q is a logical consequence of consequence of P1…PnP1…Pn
TWTWLogic + Tarski’s Logic + Tarski’s WorldWorld
S is TW S is TW necessarynecessary
S is TW S is TW possiblepossible
S and S’ are S and S’ are TW equivalentTW equivalent
Q is a TW-Q is a TW-consequence of consequence of P1…PnP1…Pn
2323
SummarySummary
Every tautological consequence of a set of premises is a Every tautological consequence of a set of premises is a logical consequence of these premises.logical consequence of these premises.Not every logical consequence of a set of premises is a Not every logical consequence of a set of premises is a tautological consequence of these premises.tautological consequence of these premises.
Tautological-Consequences of
P1…Pn
Logical-Consequences of
P1…Pn
2424
SummarySummary
Every tautological equivalence is a logical Every tautological equivalence is a logical equivalence.equivalence.Not every logical equivalence is a Not every logical equivalence is a tautological equivalence.tautological equivalence.
TautologicalEquivalences
Logical
Equivalences
2525
SummarySummary
Every tautology is a logical necessity.Every tautology is a logical necessity.Not every logical necessity is a tautology.Not every logical necessity is a tautology.
Tautologies
Logical
Necessities