2 Logic Annotated
2 Logic Annotated
Propositional Logic
1
Outline
1 Basics of Logic
2 Logical Operators
3 Logical Equivalence
2
Introduction
3
Basics of Logic
Basics of Logic
4
Statements
Definition 1
A statement (also known as a proposition) is a declarative sentence
that can be classified as either true or false (but not both).
Example 2
Which of the following are statements?
● I am five feet tall.
● x2 + 5x + 6 = 0.
● What is your name?
● This sentence is false.
● Every even number greater than 2 is the sum of two primes.
5
Statements
6
Logical Operators
Logical Operators
● Conditional (→ or ⇒)
● Equivalence (↔ or ⇔)
● Negation (¬ or ∼)
To see how logical operators work,
● Conjunction
we use truth tables. A truth table
(∧)
● Disjunction
shows the possible truth values of a
(∨)
compound statement which is
constructed from simple statements
and logical operators.
7
The Negation Operator
8
The Negation Operator
Example 3
● p ∶ This is level 100 class.
● ¬p ∶ It is not the case that this is a MATH 121 class (or, this is
not a MATH 121 class)
Example 4
● q ∶ The set N of natural numbers is countable
● ¬q ∶ The set N of natural numbers is not countable
9
The Conjunction Operator
Definition 5
Let p and q be statements. The conjunction of p and q, denoted
p ∧ q is the statement which is true when both p and q are true,
and false otherwise.
p q p∧q
T T T
T F F
F T F
F F F
Table 2: Truth table for the conjunction operator
10
The Conjunction Operator
p ∶ R is a connected set
Example 6
q ∶ R is a compact set
p ∧ q ∶ R is a connected and compact set
11
The Disjunction Operator
Definition 7
Let p and q be statements. The disjunction of p and q, denoted
p ∨ q is the statement which is true when either p or q is true (or
both are true), and false otherwise.
p q p∨q
T T T
T F T
F T T
F F F
Table 3: Truth table for the disjunction operator
12
The Disjunction Operator
p ∶ S is a convex set
Example 8
q ∶ S is a concave set
p ∨ q ∶ S is either a convex or a concave set
13
The Conditional
Definition 9
If p and q are statements, a statement of the form
If p, then q
is called an implication or a conditional statement. It is denoted by
p → q or p ⇒ q.
p q p⇒q
T T T
T F F
F T T
F F T
Table 4: Truth table for the conditional operator 14
The Conditional
15
The Conditional
16
The Biconditional
17
The Biconditional
18
Logical Equivalence
Logical Equivalence
19
Logical Equivalence
20
Logical Equivalence
Definition 12
A statement which is always true is called a tautology.
is a tautology.
21
Example 13
Determine if the following statements are tautologies:
1 ¬(p ∨ q) ⇔ (¬p ∧ ¬q)
2 (p ⇒ q) ⇔ (¬p ∨ q)
Example 14
Construct a truth table for each of the following statements:
1 p ⇒ ¬q
2 [(¬q) ∧ (p ⇒ q)] ⇒ ¬p
22
Example 15
Let p be the statement ”The figure is a polygon”, and q be the
statement ”The figure is a circle”. Express each of the following
statements using logical symbols:
1 The figure is a polygon, but it is not a circle.
2 If the figure is not a polygon, then it is a circle.
3 The figure is a polygon i↵ it is not a circle.
4 The figure is a circle whenever it is not a polygon.
23