Title: Propositional Logic
1Propositional Logic
2Logical Form
- We use informal logic everyday to express our
reasoning and conditions for actions using
connective words like - Or, and, but, if then, neither nor, etc
- Problems
- We usually dont think through the complications
of these statements and sometimes other people
misinterpret our statements - Natural language doesnt work for technical
discussions about complex systems where we must
be precise and maintain a chain of reasoning - Language sometimes plays tricks on us
- Hard to find simpler ways of stating the same
thing
3Logic
- Logic provides a way to deduce the vast amounts
of knowledge in a discipline from a small number
of explicitly stated facts - To make this deduction, we treat logic as a
language. This allows - Expression of knowledge concisely and precisely
- A way to reason about the consequences of that
knowledge rigorously - Logic addresses the correctness of the form of
any argument, not its content
4Logical Form
- To treat logic as a language, we need to create a
syntax (fundamental concepts) - Statements (Proposition)
- Declarative sentences that are true or false, but
not both - Connectives
- Negation
- Conjunction
- Disjunction
- Implication (Conditional)
- Equivalence
- The truth or falsity of a statement is called the
truth value and is characterized by assigning the
statement a value of T or F - In logic we are particularly interested in
statements and combinations of statements
(compound statements) that are either True or
False
5Proposition
- A proposition is the smallest building block for
constructing complex statements - It is a statement that is either True or False,
but not both - Atlanta was the site of the 1996 Summer Olympic
games - True - proposition
- 11 2
- True proposition
- 31 5
- False - proposition
- What will my CS1050 grade be?
- That depends not a proposition
- X 10 12
- Alone not a proposition
- For some value of x proposition
- He is ill
- Depends who He is ambiguous not a proposition
6Propositions (continued)
- Ambiguous words like I, He, Here, Good
allow the truth of the sentence to vary with the
speaker, scene or context and must be replaced
before a declarative sentence can be accepted as
a statement - Symbols are used to represent a proposition
(e.g., letters of the alphabet) - P John is tall
- Q Susan has brown hair
- R Mammals are warm-blooded
- S 11 2
- Propositions and compound propositions are the
stepping stones toward the goal of arguments,
which are sequences of statements that can be
checked for goodness (next chapter)
7Connectives
- Connectives allows us to build complicated
logical expressions (or compound statements) out
of simple propositions
Order of operations , then ? and ?, ? , and
last is ?
8Truth Tables
- Since compound propositions can be complex, we
need rules to work out the truth value - We do this by knowing the truth value of the
simpler parts and combining them to find the
truth value of the compound proposition - One way to do this is with Truth Tables
- Every connective is defined by one and only one
Truth Table definition - Evaluate proposition for every combination of
truth values
9Negation of p
- Let p be a proposition. The statement It is not
the case that p is also a proposition, called
the negation of p or p (read not p)
10Conjunction of p and q
- Let p and q be propositions The proposition p
and q is denoted by p?q - True when both p and q are true
- False otherwise
Note In a proposition, the phrases both,
but, although, and neither nor mean the
same as and
11Disjunction of p and q
- Let p and q be propositions. The proposition p
or q is denoted by p?q - False when p and q are both false
- True otherwise
Note In a proposition, the phrases either and
unless mean the same as or
12Exclusive OR of p and q
- Let p and q be propositions.
- The exclusive or of p and q is denoted by p?q
- True when exactly one of p and q is true (but not
both) - False otherwise
13Example Compound Statements
- Define the following propositions
- For a particular integer x,
- p 2 x
- q 2 lt x
- r x lt 6
- Write the compound statement
- 2 ? x p ? q
- 2 lt x lt 6 q ? r
- 2 ? x lt 6 (p ? q) ? r
- 2 ? x ?p
14Example Truth Tables
(p ? q) (p q)
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
15Example Writing Statements and Truth Tables
John is healthy and wealthy and not wise H W
S
- H John is healthy
- W John is wealthy
- S John is wise
H W S H W S H W S T T T
T F F T T F
T T T T F
T F F
F T F F F T
F F T T F F
F F T F F T
F F F T F F
F F F F F
T F
16Logical Equivalence
- Important technique in proofs is to replace a
statement with another statement that is
logically equivalent - Dogs bark and cats meow is logically equivalent
to Cats meow and dogs bark - P Dogs bark
- Q Cats Meow
- P Q ? Q P
- Two statements are logically equivalent iff they
have identical truth values for each possible
substitution of their statement variables
17Example
Same truth values, so p?q and q?p are logically
equivalent
18DeMorgans Law
- The negation of an AND statement is logically
equivalent to the OR statement in which each
component is negated - ?(p ? q) ? ?p ? ?q
- The negation of an OR statement is logically
equivalent to the AND statement in which each
component is negated - ?(p ? q) ? ?p ? ?q
- Proof
19Tautology and Contradiction
- Tautology compound proposition that is always
true regardless of the truth values of the
propositions in it. - Contradiction Compound proposition that is
always false regardless of the truth values of
the propositions in it.
20List of Logical Equivalences
p?T ? p p?F ? p Identity Laws p?T ? T
p?F ? F Domination Laws p?p ? p p?p ? p
Idempotent Laws ?(?p) ? p Double Negation
Law p?q ? q?p p?q ? q?p Commutative
Laws (p?q)?r?p?(q?r) (p?q)?r?p?(q?r)
Associative Laws
21List of Equivalences (continued)
p?(q?r) ? (p?q)?(p?r) Distribution Laws p?(q?r)
? (p?q)?(p?r) ?(p?q)?(?p ? ?q) De Morgans
Laws ?(p?q)?(?p ? ?q) p ? ?p ? T Misc.,
Theorem 1.1.1 p ? ?p ? F
(page 14) (p?q) ? (?p ? q)
22Example Distribution
Prove that p ? (q ? r) ? (p ? q) ? (p ? r)
Same Truth Values ?Logically Equivalent
23Proving Logical Equivalence
- In addition to Truth Tables, we can also use
Logical Laws and Logical Equivalences - Prove (p q) v q ? p v q
- (p q) v q Logical Equivalence
- q v (p q) Commutative
- (q v p) (q v q) Distributive
- (q v p) t Negation
- (q v p) Identity
- p v q Commutative