1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.
-
Upload
alice-moody -
Category
Documents
-
view
216 -
download
1
Transcript of 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.
![Page 1: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/1.jpg)
11
CS1502 Formal Methods in CS1502 Formal Methods in Computer ScienceComputer Science
Lecture Notes 4Lecture Notes 4
Tautologies and Logical TruthTautologies and Logical Truth
![Page 2: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/2.jpg)
22
Constructing a Truth TableConstructing a Truth Table
Write down sentenceWrite down sentence
Create the reference columnsCreate the reference columns
Until 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)
![Page 3: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/3.jpg)
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.
![Page 4: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/4.jpg)
44
ExampleExample
Is Is (A (A ( (A A (B (B C))) C))) B a tautology? B a tautology?
![Page 5: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/5.jpg)
55
ExampleExample
![Page 6: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/6.jpg)
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
![Page 7: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/7.jpg)
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
![Page 8: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/8.jpg)
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.
![Page 9: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/9.jpg)
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!
![Page 10: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/10.jpg)
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
![Page 11: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/11.jpg)
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
![Page 12: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/12.jpg)
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.)
![Page 13: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/13.jpg)
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)
![Page 14: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/14.jpg)
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’..
![Page 15: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/15.jpg)
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’
![Page 16: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/16.jpg)
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’.
![Page 17: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/17.jpg)
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’
![Page 18: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/18.jpg)
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
![Page 19: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/19.jpg)
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
![Page 20: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/20.jpg)
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..
![Page 21: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/21.jpg)
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
![Page 22: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/22.jpg)
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
TautologicalTautological
All 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
LogicalLogical
All 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
TWTW
Logic + 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
![Page 23: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/23.jpg)
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
![Page 24: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/24.jpg)
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
![Page 25: 1 CS1502 Formal Methods in Computer Science Lecture Notes 4 Tautologies and Logical Truth.](https://reader033.fdocuments.us/reader033/viewer/2022042821/56649cdf5503460f949a91b4/html5/thumbnails/25.jpg)
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