0% found this document useful (0 votes)
6 views26 pages

2 Logic Annotated

Uploaded by

basoahdaniel433
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views26 pages

2 Logic Annotated

Uploaded by

basoahdaniel433
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Introductory Concepts

Propositional Logic

First Semester, 2023


Department of Mathematics
University of Ghana

1
Outline

1 Basics of Logic

2 Logical Operators

3 Logical Equivalence

2
Introduction

● In the first two weeks, we will refresh your knowledge of key


concepts you will need in both MATH 121 and MATH 123
courses.
● Make sure you completely understand ALL of the material we
will be discussing for the next six lectures.
● These concepts are foundational; how successful your
(mathematical) building will be depends on how well you have
absorbed the information and understand it.

3
Basics of Logic
Basics of Logic

In mathematics, logical constructions are composed of the following


building blocks:
● Statements (also called propositions)
● Logical Operators (also called logical connectives)
● Quantifiers (The phrases ”for all” and ”there exists”)

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

A simple statement expresses one thought/idea/principle.

However, most mathematical statements are compound statements, which are


constructed from simple statements, joined using logical operators.

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

The negation operator changes the truth value of a statement. It is


a unary operator.
If p is true, then ¬p is false.
p ¬p
T F
F T
Table 1: Truth table for 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

Notice that the conditional statement is only false when p is true


and q is false. In all other cases it is true.
We can formulate the conditional statement in a variety of ways,
such as
● if p, then q ● q provided that p
● q if p ● q whenever p
● p implies q ● p is a sufficient condition for q
● p only if q ● q is a necessary condition for p

15
The Conditional

In the statement p ⇒ q, the statement p is called the


antecedent
q is the consequent
Example 10
1 If I get 1000 cedis, I will buy a new watch.
2 If n ∈ N is not divisible by 2, then n is an even integer.

16
The Biconditional

The biconditional satement p ⇔ q (also denoted p ↔ q) is the


Definition 11

compound statement which is true when p and q have the same


truth values and false otherwise.
p q p⇒q
T T T
T F F
F T F
F F T
Table 5: Truth table for the biconditional operator

17
The Biconditional

The biconditional statement p ⇔ q is also called an equivalence. It


can be defined as p ⇔ q = (p ⇒ q) ∧ (q ⇒ p).
Other expressions are:
● p if and only if q
● p i↵ q
● q is a necessary and sufficient condition for p

18
Logical Equivalence
Logical Equivalence

Let us consider the following compound statement:

¬(p ∧ q) ⇔ (¬p ∨ ¬q).

The truth table for this statement can be expressed as


p q ¬p ¬q p ∧ q ¬(p ∧ q) ¬p ∨ ¬q
T T F F T F F
T F F T F T T
F T T F F T T
F F T T F T T

19
Logical Equivalence

From the table above, we have


p q ¬(p ∧ q) ⇔ ¬p ∨ ¬q
T T T
T F T
F T T
F F T
This means that the statements ¬(p ∧ q) and (¬p ∨ ¬q) are
logically equivalent.

20
Logical Equivalence

Definition 12
A statement which is always true is called a tautology.

Two statements p and q are logically equivalent if and only if p ⇔ q


Equivalence and 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

You might also like