415 lecture note #1
Examples:
Examples:
Connectives (or operators)
NOTE: The meaning of or here is inclusive, that is, if one is true, the truth of the other can be either true or false (i.e., not necessarily false). For example, "I will buy a car, or I will take a vacation."
Examples:
Truth Values & Truth Tables
p Ù q | p Ú q | ¬p | ||||||||||||||||||||||||||||||||||||
|
|
|
Examples: Suppose p, r are true and q is false. Evaluate the following propositions.
¬(p Ù q) | |
(¬p) Ù ( ¬q) | |
p Ú ¬q Ù r |
Examples:
|
|
||||||||||||||||||||||||||||||||||||
|
Conditional Propositions
"if p then q" is the conditional proposition, noted "p ® q".
Example:
p |
q |
p
®
q |
|
T |
T |
T |
|
T |
F |
F |
|
F |
T |
T |
|
F |
F |
T |
Precedence and associativity of if
Examples: Parenthesize the following statements
a) p Ú ¬q ® r | |
b) p ® q Ù ¬p ® r |
Examples:
¬(p ® q) (¬p) ® ( ¬q) (p Ù q) ® r
p | q | r | (p ® q) ® r |
T | T | T | |
T | T | F | |
T | F | T | |
T | F | F | |
F | T | T | |
F | T | F | |
F | F | T | |
F | F | F |
For a conditional statement p ® q,
Some properties:
p |
q |
p
®
q |
(¬q) ® (¬p) |
|
T |
T |
T |
T | |
T |
F |
F |
F |
|
F |
T |
T |
T |
|
F |
F |
T |
T |
p |
q |
p
«
q |
T |
T |
T |
T |
F |
F |
F |
T |
F |
F |
F |
T |
Logical Equivalence
Example:
p | q | p ® q | ¬p Ú q |
T | T | ||
T | F | ||
F | T | ||
F | F |
DeMorgan's Laws
Proof by truth table (for ¬(p Ù q) and ¬p Ú ¬q)
p | q | ¬(p Ù q) | ¬p Ú ¬q |
T | T | F | |
T | F | T | |
F | T | T | |
F | F | T |
Propositional Function
A propositional function is a (logic) statement with variables.
Definition: Let P(x) be a statement involving a variable x, and let D be the set of values for x. If for each x Î D, P(x) is a proposition then P(x) is a propositional function with respect to D. D is called the domain of discourse.
Example: P(x): "The xth month of a year has 31 days.", where x is an integer 1 <= x <= 12.
Example above:
Quantified Statements
1. Universally Quantified Statements (")
Example: P(x): "For every real number x, x2 >= 0"
2. Existentially Quantified Statements ($)
Example: "There exists a real number x such that x2 = 2."
3. Quantified Statements as Propositions
NOTE (revised):
4. Generalized DeMorgan's Laws
5. Proving Quantified Statements
Examples: Prove or disprove
Proof: Suppose m and n are even
integers. We must show that m + n is even.
By definition of even, m = 2*r and n = 2*s for some integers r and
s. Then,
m + n = 2*r + 2*s ... by substitution
= 2(r +
s) ... by factoring
Let k = r + s. Then, k is an integer because it is a sum of integers. Hence,
m + n = 2*k, where k is an integer. It follows by definition of even that m + n is even.
Proof: The statement is false. A
counterexample is x = 0. Here, 0 is a real number, but 02 - 1
= -1 <= 0 [NOTE: the negation of x2 - 1 >
0 is x2 - 1 <= 0].
Examples: Prove or disprove
Multiple Quantifiers and Variables
e.g.
Negation ![]()
![]()
![]()