Title: Logical Form and Logical Equivalence
1Logical Form and Logical Equivalence
2Logical Form Example 1
- If the syntax is faultyor execution results in
division by zero,then the program will generate
an error message. - Thereforeif the computer does not generate an
error messagethen the syntax is correctand the
execution does not result in division by zero.
3Logical Form Example 2
- If x is a Real number such that xlt-2 or xgt2,then
x2gt4. - Thereforeif x2?4,then x?-2 and x?2.
4Logical Form Example 1
- If (the syntax is faulty)or (execution results
in division by zero),then (the program will
generate an error message). - Thereforeif (the computer does not generate an
error message)then (the syntax is correct)and
(the execution does not result in division by
zero).
5Logical Form Example 1
- If (p)or (q),then (r).
- Thereforeif (not r)then (not p)and (not q).
6Logical Form Example 2
- If (xlt-2) or (xgt2),then (x2gt4).
- Thereforeif (x2?4),then (x?-2) and (x?2).
7Logical Form Example 2
- If (p) or (q),then (r).
- Thereforeif (not r),then (not p) and (not q).
8Logical Form vs Content
- Examples 1 and 2 have the same formIf p or q,
then r.therefore if not r, then not p and not q. - These examples have different values for the
propositional variables p and q.
9Formal Logic Goals
- Avoid Ambiguity
- Obtain Consistency
- Elucidate Proof Mechanisms
10Mathematical Vocabulary
- New terms are defined using previously defined
terms. - Initial terms remain undefined.
- Undefined terms in logic sentence, true, false.
11Logic Symbols ? ?
- denotes not
- Negation of p is p.
12Logic Symbols ? ?
- ? denotes and
- Conjunction of p and q is p ? q.
- ? denotes or
- Disjunction of p and q is p ? q.
- Precedence first then ? and ? (unordered)
13Truth Values
14Precedence Examples
15Let p, q and r be 0ltx, xlt3, and x3
- Rewrite x ?3
- q ? r
- Rewrite 0ltxlt3
- p?q
- Rewrite 0ltx?3
- p?(q ? r)
16Negation Truth Table
p p
T F
F T
17Conjunction Truth Table
p q p?q
T T T
T F F
F T F
F F F
18Disjunction Truth Table
p q p ? q
T T T
T F T
F T T
F F F
19Statement Form
- Statement variables
- Logical connectives
- Truth table
20Exclusive Or
- p or q but not both
- (p ? q) ? (p ? q)
- Do a truth table
21Exclusive Or Truth Table
p q p ? q p ? q (p ? q) (p ? q) ? (p ? q)
22Exclusive Or Truth Table
p q p ? q p ? q (p ? q) (p ? q) ? (p ? q)
T T
T F
F T
F F
23Exclusive Or Truth Table
p q p ? q p ? q (p ? q) (p ? q) ? (p ? q)
T T T T F
T F T F T
F T T F T
F F F F T
24Exclusive Or Truth Table
p q p ? q p ? q (p ? q) (p ? q) ? (p ? q)
T T T T F F
T F T F T T
F T T F T T
F F F F T F
25Logical Equivalence
- Statement Forms are logically equivalent if, and
only if, they have the same truth tables. - P ? Q
26Logical Equivalence Examples
- 6gt2 2lt6
- p ? q q ? p
- p (p)
27De Morgans Laws
- (p ? q) ? p ? q
- (p ? q) ? p ? q
- Do truth tables
28(p ? q) ? p ? q
p q p q p ? q (p ? q) p ? q
29(p ? q) ? p ? q
p q p q p ? q (p ? q) p ? q
T T
T F
F T
F F
30(p ? q) ? p ? q
p q p q p ? q (p ? q) p ? q
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T
31Practice Negations
- John is six feet tall and weighs at least 200
pounds. - John is not six feet tall or he weighs less than
200 pounds.
32Practice Negations
- The bus was late or Toms watch was slow.
- The bus was not late and Toms watch was not
slow.
33Jim is tall and thin.
- Logical And and Or are only allowed between
statements.
34Tautologies and Contradictions
- A tautology is a statement form that is always
true regardless of the values of the statement
variables. - A contradiction is a statement form that is
always false regardless of the values of the
statement variables
35Logically Equivalent Forms
- Commutative laws
- Associative laws
- Distributive laws
- Identity laws
- Negation laws
- Double negative law
- Idempotent laws
- De Morgans laws
- Universal bound laws
- Absorption laws
- Negations of tautologies and contradictions
36Logical Equivalences
- p?q ?_________ p?q ? ________
- (p?q)?r ?_______ (p?q)?r ?_______Â
- p?(q?r) ? ______ p?(q?r) ? _______
- p?t ?__________ p?c ? __________
- p?p ? _________ p?p ? _________
- (p) ? ________
- p?p ? __________ p?p ? __________
- (p?q ) ? _______ (p?q ) ? _______
- p?t ? __________ p?c ? __________
- p?(p?q) ? ______ p?(p?q) ? ______
- t ? ___________ c ? ___________
37Logical Equivalences
- p?q ? q?p p?q ? q?p
- (p?q)?r ? p?(q?r) (p?q)?r ? p?(q?r) Â
- p?(q?r) ? (p?q)? (p? r)
- p?(q?r) ? (p?q)? (p? r)
- p?t ?p p?c ? p
- p?p ? t p?p ? c
- (p) ? p
- p?p ? p p?p ? p
- (p?q ) ? p?q (p?q ) ? p?q
- p?t ? t p?c ? c
- p?(p?q) ? p p?(p?q) ? p
- t ? c c ? t