Professional Documents
Culture Documents
1
What is an Argument?
Example:
My program won’t compile or it produces a division by 0 error.
My program does not produce a division by 0 error.
Therefore my program will not compile.
2
Example: Another disjunctive syllogism example
Ladybugs are purple or green.
Ladybugs are not green.
Therefore ladybugs are purple.
3
LOGICAL CONNECTIVES
• Use logical connectives to build complex propositions from sim-
pler ones.
Order of Operations
• ¬ first
• ∧/∨ second
• implication and biconditionals last (more on these later)
• parentheses can be used to change the order
4
Translating English Into Logic
5
Truth Tables
Examples: Give truth tables for the logical connectives not, and,
or.
Example:
P: Today it is raining.
Q: Today is it snowing.
P ∧ Q?
P ∨ Q?
7
Inclusive vs. Exclusive Or
Make sure you are interpreting “or” correctly when translating En-
glish statements into logic!!
8
Implications
Ways to read P → Q:
If P then Q.
P is sufficient for Q.
Q is necessary for P.
P implies Q.
Q follows from P.
P only if Q.
Q if P.
10
Implication Example
Interpretation of P → Q:
Think of P → Q being true as long as I do what I promised:
If P is false, you should not expect an A (though I could give you an
A), so I have honored the commitment (P → Q is true).
If P is true, P → Q is true only if Q is also true, ie if I give you an
A.
10
More on the Meaning of Implications
Example:
If I finish my work early, then I will pick you up before lunch.
The common-sense interpretation of this sentence is that the inverse
statement is also true: If I do not finish my work early, then I will
not pick you up before lunch. But this is not implied by the logical
implication P → Q, where P is “I finish my work early” and Q is “I
will pick you up before lunch”. English is not as precise as logic.
Example:
If 2 is prime, then grape juice will pour from the sky today.
Logical implication P → Q can be formed using propositions P and
Q that are not related in any way. We would never say this in English.
11
Examples: Are these implications true or false?
12
Biconditionals
13
Translating English into Logic
Example:
You can use the microlab only if you are a cs major or not a fresh-
man.
P: You can use the microlab.
Q: You are a cs major.
R: You are a freshman.
Rewrite the statement using logical connectives.
Example:
If it snows or rains today, I will not go for a walk.
Rewrite this proposition using logical connectives and propositional
variables.
14
Rearrangements of an Implication
15
LOGICAL IDENTITIES
P ≡P ∧P idempotence of ∧
P ≡P ∨P idempotence of ∨
P ∨Q≡Q∨P commutativity of ∨
P ∧Q≡Q∧P commutativity of ∧
(P ∨ Q) ∨ R ≡ P ∨ (Q ∨ R) associativity of ∨
(P ∧ Q) ∧ R ≡ P ∧ (Q ∧ R) associativity of ∧
¬(P ∨ Q) ≡ ¬P ∧ ¬Q DeMorgan’s Laws
¬(P ∧ Q) ≡ ¬P ∨ ¬Q
P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R) distributivity of ∧ over ∨
P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R) distributivity of ∨ over ∧
P ∨T ≡T domination laws
P ∧F ≡F
P ∧T ≡P identity laws
P ∨F ≡P
P ∨ ¬P ≡ T negation laws
P ∧ ¬P ≡ F
¬(¬P ) ≡ P double negation law
P ∨ (P ∧ Q) ≡ P absorption laws
P ∧ (P ∨ Q) ≡ P
P → Q ≡ ¬P ∨ Q implication
P → Q ≡ ¬Q → ¬P contrapositive
P ↔ Q ≡ [(P → Q) ∧ (Q → P )] equivalence
[(P ∧ Q) → R] ≡ [P → (Q → R)] exportation
17
More on Propositional Equivalence
Example:
P: Ann will go to the movie.
Q: Scott will go to the movie.
Using DeMorgan’s law, ¬(P ∨Q) ≡ ¬P ∧¬Q, write down ¬(P ∨Q).
20
Equivalence Proofs using the Logical Identities
21
Grammar/Syntax
Note: We will often mix logical notation and English, but even when we
do this, logical symbols must obey the same strict rules. Remember that
every logical symbol can only be used according to strict syntax rules. Do
NOT simply plug in a symbol anywhere that the corresponding English word
would fit. For example, the ∧ connective cannot always be used to replace
the word “and” in a sentence.