Introduction To Logic
Introduction To Logic
Quantifiers reveal a quantity (i.e., how much or how many). There are
two types of quantifiers
p q p^q
F F F
F T F
T F F
T T T
Truth Tables
p q pvq
F F F
F T T
T F T
T T T
p ~p
T F
F T
Examples of compound statements
p q p^q ~(p^q)
F F F T
F T F T
T F F T
T T T F
Examples of compound statements
p q ~p ~q ~p v ~q
F F T T T
F T T F T
T F F T T
T T F F F
Examples of compound statements
Notice from the previous truth tables that ~p v ~q has the same output
as ~(p ^ q). This is one of DeMorgan’s laws. DeMorgan’s second law
states that ~(p v q) is equivalent to ~p ^ ~q
p q ~(p ^ q) ~p v ~q
F F T T
F T T T
T F T T
T T F F
Conditional statements
If p then q. Consider the following statement: “If I win the election, then
taxes will decrease.”
p q p -> q ~(p->q) p ~q p ^ ~q
F F T F F T F
F T T F F F F
T F F T T T T
T T T F T F F
Negation of conditional statements
The negation of a conditional statement is as follows:
~(p -> q) = p ^ ~q
Consider the following conditional statement: “If I have money, then I’ll
go to the movies”
What does the negation of this statement look like? If you said, “I don’t
have money, so I won’t go to the movies” that would be wrong.
The correct negation is: “I have money and I do not go to the movies”
Propositional Logic
• An assertion is a statement and not a question or giving an order
(i.e., an imperative).
• A proposition is an assertion which is either true or false, but not
both. In other words, you must be able to associate a truth value
with an assertion.
• Truth values are either TRUE or FALSE
• Consider the following examples of propositions
• 4 is a prime number.
• 3+3=6
• The moon is made of cheese
“X + Y > 4”. Is this true or false. It depends on the value for X and Y. We cannot associate a unique truth value to this statement.
“X = 3”. Again, you can’t associate a unique truth value to this statement. If x is 3, the statement is true, but if x is 4 the statement is false.
“Are you leaving?” is not an assertion, rather its a question and therefore not a proposition.
“buy four books” is an order or imperative and therefore cannot be a proposition.
In general, if a statement is not an assertion it cannot be a proposition, but is special cases there can be assertions that are not proposition.
• “This statement is false” is an assertion, but not a proposition because you cannot associate a unique truth value (i.e., if this statement is true then it is false, but if it’s
false then its true). This is a liar’s paradox
Propositional Variables
• A propositional variable indicates an arbitrary proposition with
unspecified truth value P, Q, R, …
• P, Q and R can represent or substutute for proposition statements
• e.g., P: John is 6 feet tall, Q: There are 4 cows in the barn
• Logical Connectives
• P and Q
• John is 6 feet tall and there are 4 cows in the barn.
• P or Q
• John is 6 feet tall or there are 4 cows in the barn.
• Not P
• John is not 6 feet tall
Propositional Forms
• An assertion which contains at least one propositional variable is
called a propositional form.