Title: LOGIC
1LOGIC
- I refuse to join any club that would have me for
a member. - -Grouch Marx
2WHAT IS LOGIC?
- "I know what you're thinking about," said
Tweedledum "but it isn't so, no how."
"Contrariwise," continued Tweedledee, "if it was
so, it might be and if it were so, it would be
but as it isn't, it ain't. That's logic."
3Deductive vs. Inductive Reasoning
DAY ONE
- Deductive If Jimi Hendrix is a great guitarist,
then I have all his albums. - Jimi Hendrix is a great guitarist. I have all
his albums. - Inductive If Jimi Hendrix is a great guitarist,
then it is likely I have all his albums.
4Propositions
- Logic is a system based on propositions.
- A proposition is a statement that is either true
or false (not both). - A statement is a sentence that is true or false.
- 1 1 2 1 1
3 - We say that the truth value of a proposition is
either true (T) or false (F).
5Elephants are bigger than mice.
Is this a statement?
yes
Is this a proposition?
yes
What is the truth value of the proposition?
true
6520
Is this a statement?
yes
Is this a proposition?
yes
What is the truth value of the proposition?
false
7Today is January 1 and 99
Is this a statement?
yes
Is this a proposition?
yes
What is the truth value of the proposition?
false
8Please do not fall asleep.
Is this a statement?
no
Its a request.
Is this a proposition?
no
Only statements can be propositions.
9Propositional Functions
- Propositional function (open sentence)
- statement involving one or more variables,
- x-3 5
- Let us call this propositional function P(x),
where P is the predicate and x is the variable.
What is the truth value of P(2) ?
false
What is the truth value of P(8) ?
false
What is the truth value of P(9) ?
true
10Propositional Functions
- Let us consider the propositional function Q(x,
y, z) defined as - x y z.
- Here, Q is the predicate and x, y, and z are the
variables.
What is the truth value of Q(2, 3, 5) ?
true
What is the truth value of Q(0, 1, 2) ?
false
What is the truth value of Q(9, -9, 0) ?
true
11Universal Quantification
- Let P(x) be a propositional function.
- Universally quantified sentence
- For all x in the universe of discourse P(x) is
true. - ? x ? S, P(x)
- x is an element in a set
- S is the set of elements
- ? means belongs to or is a member of
? Means for ALL
12Universal Quantification
- Examples
- 1. ? x ?1,2,3,4, 2 x is even
- 2. ? x ?s, x2 0
13Existential Quantification
- Existentially quantified sentence
- There exists an x in the universe of discourse
for which P(x) is true. - Using the existential quantifier ?
- ?x ?S, P(x) There is an x such that P(x).
- There is at least one x such that P(x).
? Means there exists
14Existential Quantification
- Examples
- 3. ?x ? 2,6,8,10,, x 5 11
- 4. ?x ?,-1,0,1,2,, x2 2
15Symbols represent facts
DAY TWO
Puff Daddy is a rapper is a fact that could be
represented by the symbol P
16Logical connectives
? and conjunction ? or disjunction ? not negation
? implication if, then conditional ?
equivalence if and only if biconditional
17Propositional Logic
- P represents the fact Puff Daddy is a rapper
- Q represents the fact Puff Daddy is rich
- P ? Q Puff Daddy is a rapper and Puff Daddy is
rich - P ? Q Puff Daddy is a rapper or Puff Daddy is
rich - ? Q Puff Daddy is not rich
- Q ? P Puff Daddy is rich therefore Puff Daddy
is a rapper - P ? Q Puff Daddy is a rapper therefore Puff
Daddy is rich and Puff Daddy is rich therefore
Puff Daddy is a rapper
18Propositional Logic Semantics
- Logic is made up sentences
- P might be a sentence
- P ? Q is also a sentence
- If we know the truth values of P and Q, we can
work out the truth value of the sentence - If P and Q are both true then P ? Q is true,
otherwise it is false - Can use truth tables to ascertain the truth of a
sentence
19Negation truth table
20Conjunction truth table
21Disjunction truth table
22Conditional truth table
23Negation of a conditional
- p ? q
- Negation p ? ? q
- or p ? ? q
24Example
25Example
26Logical Equivalence
- Two statements are logically equivalent if their
truth tables have the same values for all
substitutions
27(No Transcript)
28A tautology is a statement that is always true.
DAY THREE
- Examples
- R?(? R)
- ? (P?Q)?(? P)?(? Q)
- If S?T is a tautology, we write S?T.
- If S?T is a tautology, we write S?T.
29A contradiction is a statement that is
alwaysfalse
- Examples
- R?(? R)
- ? (? (P?Q)?(? P)?(? Q))
- The negation of any tautology is a contradiction,
and the negation of any contradiction is a
tautology.
30Converse
- If p then q.
- If q then p.
31Inverse
- Negate the hypothesis and conclusion
- If p then q.
- If not p then not q.
32Contrapositive
- Reverse and negate both.
- If p then q.
- If not q then not p.
33A conditional and its contrapositive are
logically equivalent.
34Modus Ponens
DAY FOUR
- Law of Detachment
- If Jennifer married Marc Anthony, then Ben
Affleck is lucky. Jennifer married Marc
Anthony. - Therefore, Ben Affleck is lucky.
method of affirming
35Modus tollens
- Ben Affleck is not lucky. If J-Lo married Marc
Anthony, then Ben Affleck is lucky. - Therefore, J-Lo did not marry Marc Anthony.
If q is false, and if p implies q, (p ? q),
then p is also false
Method of denying
36If Paris Hilton is rich, then she will travel the
world in an RV.
37De Morgans Law
- For all statements p and q
- ? (p ? q) ?p ? ?q
- And
- ? (p ? q) ?p ? ?q
38Example
- I want to watch the Matrix or Harry Potter on dvd.
39Fallacy
- No one has ever proven that ghosts don't exist.
Therefore, they obviously do.
- Our society is filled with violence and there is
a lot of violence on TV. It is obvious that the
violence in society is caused by people watching
television.