Proposition Logic
Proposition Logic
What is an Argument?
Definition: An argument consists of a sequence of statements
called premises and a statement called a conclusion. An argument is valid if the conclusion is true whenever the premises are all
true.
Example:
My program wont 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.
Now: Rewrite this argument in its general form by defining appropriate propositional variables.
This is one example of an argument form that is called disjunctive
syllogism.
LOGICAL CONNECTIVES
Use logical connectives to build complex propositions from simpler ones.
The First Three Logical Connectives
denotes not. P is the negation of P.
denotes or. P Q is the disjunction of P and Q.
denotes and. P Q is the conjunction of P and Q.
Order of Operations
first
/ second
implication and biconditionals last (more on these later)
parentheses can be used to change the order
Exercise (on your own) Try out googles advanced search, which
lets you use logical connectives to limit your hits. What options on
the search page correspond to:
ANDing together several terms, e.g., search for pages that contain induction and mathematical.
ORing - search for pages that contain Russell or Barber
plus also paradox.
ANDing and negation - search for pages that contain wheat
but not gluten.
Truth Tables
Truth tables represent the relationship between the truth values of
propositions and compound propositions formed from those propositions.
Examples: Give truth tables for the logical connectives not, and,
or.
Example: P: Today is Friday. What is P ?
Example: P: At least two inches of rain fell in Austin today.
P ?
Example:
P: Today it is raining.
Q: Today is it snowing.
P Q?
P Q?
Implication Example
Example: If you earn 90% of the possible points in cs 313k, then
you will get an A.
Rewritten in logical notation: P Q, where
P is: You earn 90% of the possible points in cs 313k.
Q is: You will get an A in cs 313k.
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.
Example: Give the truth table for implication P Q.
10
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
12
Biconditionals
The biconditional of statements P and Q, denoted P Q, is
read P if and only if Q (or P is necessary and sufficient for Q),
and is true if P and Q have the same truth values, and false otherwise.
Example: Write down the truth table of P Q.
13
14
Rearrangements of an Implication
Definition: For conditional statement P Q, the converse
statement is Q P , the contrapositive statement is Q P ,
and the inverse statement is P Q.
Note: As we saw in a previous example, we can use a truth table to
determine if two compound propositions are logically equivalent,
ie if they always have the same truth values. If two propositions R
and S are logically equivalent, we write R S.
Example: Use a truth table to determine whether or not the converse, contrapositive and inverse statements are logically equivalent
to P Q.
Definition: If a compound proposition is always true, it is a tautology. Note that if R S is a tautology, then R S.
Note: is not a logical connective and R S is not a compound proposition. R S just means that R S is a tautology.
Alternate notation: R S.
15
16
LOGICAL IDENTITIES
P P P
P P P
P QQP
P QQP
(P Q) R P (Q R)
(P Q) R P (Q R)
(P Q) P Q
(P Q) P Q
P (Q R) (P Q) (P R)
P (Q R) (P Q) (P R)
P T T
P F F
P T P
P F P
P P T
P P F
(P ) P
P (P Q) P
P (P Q) P
P Q P Q
P Q Q P
P Q [(P Q) (Q P )]
[(P Q) R] [P (Q R)]
17
idempotence of
idempotence of
commutativity of
commutativity of
associativity of
associativity of
DeMorgans Laws
distributivity of over
distributivity of over
domination laws
identity laws
negation laws
double negation law
absorption laws
implication
contrapositive
equivalence
exportation
3. P Q QP
Sam is rich and Sam is happy is equivalent to Sam is happy and
Sam is rich.
4. (P Q) P Q - DeMorgans law
It is not the case that Sam is rich or happy is equivalent to Sam
is not rich and he is not happy.
4 . (P Q) P Q
It is not true that Abby is quick and strong is equivalent to Abby
is not quick or Abby is not strong.
5. P (Q R) (P Q) (P R) - distributivity
Abby is strong, and Abby is happy or nervous is equivalent to
Abby is strong and happy, or Abby is strong and nervous.
5 . P (Q R) (P Q) (P R)
Sam is tired, or Sam is happy and rested is equivalent to Sam is
tired or happy, and Sam is tired or rested.
6. P P T - negation law
Ted is healthy or Ted is not healthy is true.
6 . P P F
Kate won the lottery and Kate didnt win the lottery is false.
18
7. (P ) P - double negation
It is not the case that Tom is not rich is equivalent to Tom is
rich.
8. P (P Q) P - absorption
Kate is happy, or Kate is happy and healthy is true if and only if
Kate is happy is true.
8 . P (P Q) P
Kate is sick, and Kate is sick or angry is true if and only if Kate
is sick is true.
9. P Q P Q - implication
If I win tne lottery, then I will give you half the money is true
exactly when I either dont win the lottery, or I give you half the
money.
10. P Q Q P - contrapositive
If Anna is healthy, then she is happy is equivalent to If Anna is
not happy, then she is not healthy.
11. P Q (P Q) (Q P ) equivalence
Anna is healthy if and only if she is happy is equivalent to If
Anna is healthy, then she is happy, and if Anna is happy, then she is
healthy.
12. (P Q) R P (Q R) - exportation
Anna is famous implies that if she is rich, then she is happy is
equivalent to If Anna is famous and rich, then she is happy.
19
20
21