Download as pdf or txt
Download as pdf or txt
You are on page 1of 276

Propositional Logic 1: Motivation – Parse Tree

Mathematical Logic – First Term 2021-2022

MZI

School of Computing
Telkom University

SoC Tel-U

September-October 2021

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 1 / 45


Acknowledgements
This slide is compiled using the materials in the following sources:
1 Discrete Mathematics and Its Applications (Chapter 1), 8th Edition, 2019, by
K. H. Rosen (primary reference).
2 Discrete Mathematics with Applications (Chapter 2), 5th Edition, 2018, by
S. S. Epp.
3 Logic in Computer Science: Modelling and Reasoning about Systems
(Chapter 1), 2nd Edition, 2004, by M. Huth and M. Ryan.
4 Mathematical Logic for Computer Science (Chapter 2, 3, 4), 2nd Edition,
2000, by M. Ben-Ari.
5 Discrete Mathematics 1 (2012) slides in Fasilkom UI by B. H. Widjaja.
6 Mathematical Logic slides in Telkom University by A. Rakhmatsyah and B.
Purnama.
Some …gures are excerpted from those sources. This slide is intended for internal
academic purpose in SoC Telkom University. No slides are ever free from error nor
incapable of being improved. Please convey your comments and corrections (if
any) to <pleasedontspam>@telkomuniversity.ac.id.
MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 2 / 45
Contents

1 Motivation

2 Proposition: De…nition

3 Proposition: Example

4 Logical Operators and Compound Propositions

5 Precedences of Logical Operators

6 Propositional Formulas (Supplementary)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 3 / 45


Motivation

Contents

1 Motivation

2 Proposition: De…nition

3 Proposition: Example

4 Logical Operators and Compound Propositions

5 Precedences of Logical Operators

6 Propositional Formulas (Supplementary)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 4 / 45


Motivation

Motivation: Why do we need to learn propositional logic?

Propositional logic is one of the foundations in computer science and software


engineering.

System Speci…cation Consistency Problem


A software engineer is inquired by his manager to develop an information system
that complies following speci…cation:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 5 / 45


Motivation

Motivation: Why do we need to learn propositional logic?

Propositional logic is one of the foundations in computer science and software


engineering.

System Speci…cation Consistency Problem


A software engineer is inquired by his manager to develop an information system
that complies following speci…cation:
1 Whenever the system software is being upgraded, the user cannot access …le
system;

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 5 / 45


Motivation

Motivation: Why do we need to learn propositional logic?

Propositional logic is one of the foundations in computer science and software


engineering.

System Speci…cation Consistency Problem


A software engineer is inquired by his manager to develop an information system
that complies following speci…cation:
1 Whenever the system software is being upgraded, the user cannot access …le
system;
2 If the user can access …le system, then the user can save a new …le;

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 5 / 45


Motivation

Motivation: Why do we need to learn propositional logic?

Propositional logic is one of the foundations in computer science and software


engineering.

System Speci…cation Consistency Problem


A software engineer is inquired by his manager to develop an information system
that complies following speci…cation:
1 Whenever the system software is being upgraded, the user cannot access …le
system;
2 If the user can access …le system, then the user can save a new …le;
3 If the user cannot save a new …le, then the system software is not being
upgraded.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 5 / 45


Motivation

Motivation: Why do we need to learn propositional logic?

Propositional logic is one of the foundations in computer science and software


engineering.

System Speci…cation Consistency Problem


A software engineer is inquired by his manager to develop an information system
that complies following speci…cation:
1 Whenever the system software is being upgraded, the user cannot access …le
system;
2 If the user can access …le system, then the user can save a new …le;
3 If the user cannot save a new …le, then the system software is not being
upgraded.
Can an information system with these speci…cation be built?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 5 / 45


Motivation

Motivation: Why do we need to learn propositional logic?

Propositional logic is one of the foundations in computer science and software


engineering.

System Speci…cation Consistency Problem


A software engineer is inquired by his manager to develop an information system
that complies following speci…cation:
1 Whenever the system software is being upgraded, the user cannot access …le
system;
2 If the user can access …le system, then the user can save a new …le;
3 If the user cannot save a new …le, then the system software is not being
upgraded.
Can an information system with these speci…cation be built? In other words, are
these system speci…cation consistent?
System speci…cation consistency problem is one of the problems that can be
solved using propositional logic which we are going to learn.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 5 / 45


Proposition: De…nition

Contents

1 Motivation

2 Proposition: De…nition

3 Proposition: Example

4 Logical Operators and Compound Propositions

5 Precedences of Logical Operators

6 Propositional Formulas (Supplementary)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 6 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s;

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ;

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write: T,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write: T, >,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write: T, >, 1

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write: T, >, 1
false, or we can also write:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write: T, >, 1
false, or we can also write: F,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write: T, >, 1
false, or we can also write: F, ?,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: De…nition

Proposition

Proposition
A proposition is a declarative sentence or a statement that is either true or false,
but not both.
Propositional logic: a system of logic based on propositions. We also called this
stu¤ by its fancier name: propositional calculus (no connection with single
variable calculus though).

A simple proposition is usually written with lowercase letters:


p; q; r; s; p1 ; p2 ; : : : ; q1 ; q2 ; : : :.

The verity (the truth) of a proposition:


true, or we can also write: T, >, 1
false, or we can also write: F, ?, 0

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 7 / 45


Proposition: Example

Contents

1 Motivation

2 Proposition: De…nition

3 Proposition: Example

4 Logical Operators and Compound Propositions

5 Precedences of Logical Operators

6 Propositional Formulas (Supplementary)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 8 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

34 43 < 10

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

34 43 < 10

Is this a statement?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

34 43 < 10

Is this a statement? Yes.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

34 43 < 10

Is this a statement? Yes.


Is this a proposition?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

34 43 < 10

Is this a statement? Yes.


Is this a proposition? Yes.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

34 43 < 10

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Some Examples of Propositions

23 < 32

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? True.

34 43 < 10

Is this a statement? Yes.


Is this a proposition? Yes.
Truth value? False (because 34 43 = 17).

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 9 / 45


Proposition: Example

Other Examples

x+3 2021

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

x + 2x 3x = 0

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

x + 2x 3x = 0

Is this a statement?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

x + 2x 3x = 0

Is this a statement? Yes.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

x + 2x 3x = 0

Is this a statement? Yes.


Is this a proposition?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

x + 2x 3x = 0

Is this a statement? Yes.


Is this a proposition? Yes, because regardless the value of x, the statement
x + 2x 3x = 0 is always true.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

x + 2x 3x = 0

Is this a statement? Yes.


Is this a proposition? Yes, because regardless the value of x, the statement
x + 2x 3x = 0 is always true.
Truth value?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

x+3 2021

Is this a statement? Yes.


Is this a proposition? No, because its truth depends on x (the statement is
true if x 2018 and is false otherwise).
This type of statement is called an open sentence.

x + 2x 3x = 0

Is this a statement? Yes.


Is this a proposition? Yes, because regardless the value of x, the statement
x + 2x 3x = 0 is always true.
Truth value? True.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 10 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.


Is this a proposition?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.


Is this a proposition? No, because this is not a statement.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.


Is this a proposition? No, because this is not a statement.
Only a statement can be a proposition .

Exercise
Verify whether following sentences are propositions or not.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.


Is this a proposition? No, because this is not a statement.
Only a statement can be a proposition .

Exercise
Verify whether following sentences are propositions or not.
1 “Have you understood the de…nition of a proposition?”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.


Is this a proposition? No, because this is not a statement.
Only a statement can be a proposition .

Exercise
Verify whether following sentences are propositions or not.
1 “Have you understood the de…nition of a proposition?”
2 “I have understood the de…nition of a proposition.”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.


Is this a proposition? No, because this is not a statement.
Only a statement can be a proposition .

Exercise
Verify whether following sentences are propositions or not.
1 “Have you understood the de…nition of a proposition?”
2 “I have understood the de…nition of a proposition.”
3 “Fus Ro Dah!”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Proposition: Example

Other Examples

“Please read your textbooks regularly!”

Is this a statement? No, this is a requisition.


Is this a proposition? No, because this is not a statement.
Only a statement can be a proposition .

Exercise
Verify whether following sentences are propositions or not.
1 “Have you understood the de…nition of a proposition?”
2 “I have understood the de…nition of a proposition.”
3 “Fus Ro Dah!”
4 “Bla bla bla, $#@&%!”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 11 / 45


Logical Operators and Compound Propositions

Contents

1 Motivation

2 Proposition: De…nition

3 Proposition: Example

4 Logical Operators and Compound Propositions

5 Precedences of Logical Operators

6 Propositional Formulas (Supplementary)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 12 / 45


Logical Operators and Compound Propositions

Logical Operators and Compound Propositions

We have seen several simple propositions,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 13 / 45


Logical Operators and Compound Propositions

Logical Operators and Compound Propositions

We have seen several simple propositions, these propositions are called atoms or
atomic propositions.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 13 / 45


Logical Operators and Compound Propositions

Logical Operators and Compound Propositions

We have seen several simple propositions, these propositions are called atoms or
atomic propositions.

From two or more atomic propositions, we can combine these propositions to form
a new proposition using logical operator (logical connectives). The resulted
proposition is called a compound proposition.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 13 / 45


Logical Operators and Compound Propositions

Logical Operators and Compound Propositions

We have seen several simple propositions, these propositions are called atoms or
atomic propositions.

From two or more atomic propositions, we can combine these propositions to form
a new proposition using logical operator (logical connectives). The resulted
proposition is called a compound proposition.

Based on the number of propositions involved, there are two types of elementary
logical operators:
1 unary operator ; only requires one operand:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 13 / 45


Logical Operators and Compound Propositions

Logical Operators and Compound Propositions

We have seen several simple propositions, these propositions are called atoms or
atomic propositions.

From two or more atomic propositions, we can combine these propositions to form
a new proposition using logical operator (logical connectives). The resulted
proposition is called a compound proposition.

Based on the number of propositions involved, there are two types of elementary
logical operators:
1 unary operator ; only requires one operand: negation (: or );
2 binary operator ; requires two operands:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 13 / 45


Logical Operators and Compound Propositions

Logical Operators and Compound Propositions

We have seen several simple propositions, these propositions are called atoms or
atomic propositions.

From two or more atomic propositions, we can combine these propositions to form
a new proposition using logical operator (logical connectives). The resulted
proposition is called a compound proposition.

Based on the number of propositions involved, there are two types of elementary
logical operators:
1 unary operator ; only requires one operand: negation (: or );
2 binary operator ; requires two operands: conjunction (^), disjunction (_),
exclusive disjunction/ exclusive-or ( ), implication (!), bi-implication ($)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 13 / 45


Logical Operators and Compound Propositions

Negation

Negation
Let p be a proposition. Then :p (also denoted by p or p) is also a proposition
which is called the negation of p.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 14 / 45


Logical Operators and Compound Propositions

Negation

Negation
Let p be a proposition. Then :p (also denoted by p or p) is also a proposition
which is called the negation of p.

:p is read not p or “it is not the case that p”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 14 / 45


Logical Operators and Compound Propositions

Negation

Negation
Let p be a proposition. Then :p (also denoted by p or p) is also a proposition
which is called the negation of p.

:p is read not p or “it is not the case that p”

:p has the truth value that is the opposite of the truth value of p.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 14 / 45


Logical Operators and Compound Propositions

Negation

Negation
Let p be a proposition. Then :p (also denoted by p or p) is also a proposition
which is called the negation of p.

:p is read not p or “it is not the case that p”

:p has the truth value that is the opposite of the truth value of p.

:p is true (T) precisely when p is false.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 14 / 45


Logical Operators and Compound Propositions

Negation

Negation
Let p be a proposition. Then :p (also denoted by p or p) is also a proposition
which is called the negation of p.

:p is read not p or “it is not the case that p”

:p has the truth value that is the opposite of the truth value of p.

:p is true (T) precisely when p is false.

The truth table for negation of a proposition:

p :p
T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 14 / 45


Logical Operators and Compound Propositions

Negation

Negation
Let p be a proposition. Then :p (also denoted by p or p) is also a proposition
which is called the negation of p.

:p is read not p or “it is not the case that p”

:p has the truth value that is the opposite of the truth value of p.

:p is true (T) precisely when p is false.

The truth table for negation of a proposition:

p :p
T F
F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 14 / 45


Logical Operators and Compound Propositions

Negation

Negation
Let p be a proposition. Then :p (also denoted by p or p) is also a proposition
which is called the negation of p.

:p is read not p or “it is not the case that p”

:p has the truth value that is the opposite of the truth value of p.

:p is true (T) precisely when p is false.

The truth table for negation of a proposition:

p :p
T F
F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 14 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or “I am not a student”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or “I am not a student”
2 “it is not true that this month is not August” or

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or “I am not a student”
2 “it is not true that this month is not August” or “this month is August”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or “I am not a student”
2 “it is not true that this month is not August” or “this month is August”
3 “it is not true that Alex didn’t do nothing” or

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or “I am not a student”
2 “it is not true that this month is not August” or “this month is August”
3 “it is not true that Alex didn’t do nothing” or “Alex did do nothing”

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or “I am not a student”
2 “it is not true that this month is not August” or “this month is August”
3 “it is not true that Alex didn’t do nothing” or “Alex did do nothing”
4 210 102

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Example of Negations

Exercise
Write in English the negation of following propositions:
1 “I am a student”
2 “This month is not August”
3 “Alex didn’t do nothing”
4 210 < 102
5 34 43
Solution:
1 “it is not true that I am a student” or “I am not a student”
2 “it is not true that this month is not August” or “this month is August”
3 “it is not true that Alex didn’t do nothing” or “Alex did do nothing”
4 210 102
5 34 < 43

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 15 / 45


Logical Operators and Compound Propositions

Negation and Antonym

Example
Write in English the negation of following propositions.
1 Bill is richer than Steve.
2 Steve is older than Bill.
Solution:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 16 / 45


Logical Operators and Compound Propositions

Negation and Antonym

Example
Write in English the negation of following propositions.
1 Bill is richer than Steve.
2 Steve is older than Bill.
Solution:
1 “It is not true that Bill is richer than Steve” or in other words

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 16 / 45


Logical Operators and Compound Propositions

Negation and Antonym

Example
Write in English the negation of following propositions.
1 Bill is richer than Steve.
2 Steve is older than Bill.
Solution:
1 “It is not true that Bill is richer than Steve” or in other words “Bill is as rich
as Steve or he is poorer than Steve”.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 16 / 45


Logical Operators and Compound Propositions

Negation and Antonym

Example
Write in English the negation of following propositions.
1 Bill is richer than Steve.
2 Steve is older than Bill.
Solution:
1 “It is not true that Bill is richer than Steve” or in other words “Bill is as rich
as Steve or he is poorer than Steve”.
2 “It is not true that Steve is older than Bill” or in other words

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 16 / 45


Logical Operators and Compound Propositions

Negation and Antonym

Example
Write in English the negation of following propositions.
1 Bill is richer than Steve.
2 Steve is older than Bill.
Solution:
1 “It is not true that Bill is richer than Steve” or in other words “Bill is as rich
as Steve or he is poorer than Steve”.
2 “It is not true that Steve is older than Bill” or in other words “Steve is as old
as Bill or he is younger than Bill”.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 16 / 45


Logical Operators and Compound Propositions

Double Negative

In Standard English, two negatives are understood to resolve to a positive;


however, today as African American culture becomes more dispersed, the use of
double negatives becomes increasingly prevalent and in many cases lead to
confusions.

For examples:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 17 / 45


Logical Operators and Compound Propositions

Double Negative

In Standard English, two negatives are understood to resolve to a positive;


however, today as African American culture becomes more dispersed, the use of
double negatives becomes increasingly prevalent and in many cases lead to
confusions.

For examples:
1 I didn’t do nothing.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 17 / 45


Logical Operators and Compound Propositions

Double Negative

In Standard English, two negatives are understood to resolve to a positive;


however, today as African American culture becomes more dispersed, the use of
double negatives becomes increasingly prevalent and in many cases lead to
confusions.

For examples:
1 I didn’t do nothing. (So, the speaker did something or not?)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 17 / 45


Logical Operators and Compound Propositions

Double Negative

In Standard English, two negatives are understood to resolve to a positive;


however, today as African American culture becomes more dispersed, the use of
double negatives becomes increasingly prevalent and in many cases lead to
confusions.

For examples:
1 I didn’t do nothing. (So, the speaker did something or not?)
2 I ain’t got no money.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 17 / 45


Logical Operators and Compound Propositions

Double Negative

In Standard English, two negatives are understood to resolve to a positive;


however, today as African American culture becomes more dispersed, the use of
double negatives becomes increasingly prevalent and in many cases lead to
confusions.

For examples:
1 I didn’t do nothing. (So, the speaker did something or not?)
2 I ain’t got no money. (So, the speaker got some money or not?)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 17 / 45


Logical Operators and Compound Propositions

Double Negative

In Standard English, two negatives are understood to resolve to a positive;


however, today as African American culture becomes more dispersed, the use of
double negatives becomes increasingly prevalent and in many cases lead to
confusions.

For examples:
1 I didn’t do nothing. (So, the speaker did something or not?)
2 I ain’t got no money. (So, the speaker got some money or not?)
3 I’m not hungry no more.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 17 / 45


Logical Operators and Compound Propositions

Double Negative

In Standard English, two negatives are understood to resolve to a positive;


however, today as African American culture becomes more dispersed, the use of
double negatives becomes increasingly prevalent and in many cases lead to
confusions.

For examples:
1 I didn’t do nothing. (So, the speaker did something or not?)
2 I ain’t got no money. (So, the speaker got some money or not?)
3 I’m not hungry no more. (So, the speaker is hungry or not?)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 17 / 45


Logical Operators and Compound Propositions

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 18 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

p ^ q is read p and q.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

p ^ q is read p and q.

p ^ q is true (T) precisely when both p and q are true and is false otherwise.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

p ^ q is read p and q.

p ^ q is true (T) precisely when both p and q are true and is false otherwise.

Truth table for conjunction of two propositions:

p q p^q
T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

p ^ q is read p and q.

p ^ q is true (T) precisely when both p and q are true and is false otherwise.

Truth table for conjunction of two propositions:

p q p^q
T T T
T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

p ^ q is read p and q.

p ^ q is true (T) precisely when both p and q are true and is false otherwise.

Truth table for conjunction of two propositions:

p q p^q
T T T
T F F
F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

p ^ q is read p and q.

p ^ q is true (T) precisely when both p and q are true and is false otherwise.

Truth table for conjunction of two propositions:

p q p^q
T T T
T F F
F T F
F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Conjunction

Conjunction
Let p and q be propositions. Then p ^ q is also a proposition which is called the
conjunction of p and q.

p ^ q is read p and q.

p ^ q is true (T) precisely when both p and q are true and is false otherwise.

Truth table for conjunction of two propositions:

p q p^q
T T T
T F F
F T F
F F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 19 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q :

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is false.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is false.
2 :r ^ :s :

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is false.
2 :r ^ :s : Cat is not a reptile and

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is false.
2 :r ^ :s : Cat is not a reptile and 24 42
Since “cat is not a reptile” is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is false.
2 :r ^ :s : Cat is not a reptile and 24 42
Since “cat is not a reptile” is true and 24 42 is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is false.
2 :r ^ :s : Cat is not a reptile and 24 42
Since “cat is not a reptile” is true and 24 42 is true, then :r ^ :s is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Examples of Conjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
p ^ :q; (2) :r ^ :s.

Solution:
1 p ^ :q : The sun rises in the east and 2 3 > 32
Since “the sun rises in the east” is true and 2 3 > 32 is false, then p ^ :q
is false.
2 :r ^ :s : Cat is not a reptile and 24 42
Since “cat is not a reptile” is true and 24 42 is true, then :r ^ :s is true.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 20 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

p _ q is false (F) precisely when both p and q are false and is true otherwise.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

p _ q is false (F) precisely when both p and q are false and is true otherwise.

Truth table for disjunction of two propositions:

p q p_q
T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

p _ q is false (F) precisely when both p and q are false and is true otherwise.

Truth table for disjunction of two propositions:

p q p_q
T T T
T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

p _ q is false (F) precisely when both p and q are false and is true otherwise.

Truth table for disjunction of two propositions:

p q p_q
T T T
T F T
F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

p _ q is false (F) precisely when both p and q are false and is true otherwise.

Truth table for disjunction of two propositions:

p q p_q
T T T
T F T
F T T
F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

p _ q is false (F) precisely when both p and q are false and is true otherwise.

Truth table for disjunction of two propositions:

p q p_q
T T T
T F T
F T T
F F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45


Logical Operators and Compound Propositions

Disjunction
Disjunction
Let p and q be propositions. Then p _ q is also a proposition which is called the
disjunction of p and q.

p _ q is read p or q:

p _ q is false (F) precisely when both p and q are false and is true otherwise.

Truth table for disjunction of two propositions:

p q p_q
T T T
T F T
F T T
F F F

Observe that p _ q is also true if both p and q are true.


MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 21 / 45
Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q :

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is false,
then :p _ :q is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is false,
then :p _ :q is false.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is false,
then :p _ :q is false.
2 r _ :s : Cat is a reptile or

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is false,
then :p _ :q is false.
2 r _ :s : Cat is a reptile or 24 42
Since “cat is a reptile” is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is false,
then :p _ :q is false.
2 r _ :s : Cat is a reptile or 24 42
Since “cat is a reptile” is false and 24 42 is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is false,
then :p _ :q is false.
2 r _ :s : Cat is a reptile or 24 42
Since “cat is a reptile” is false and 24 42 is true, then r _ :s is

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Examples of Disjunctions

Exercise
Suppose we have following atomic propositions:

p : The sun rises in the east q : 2 3 32


r : Cat is a reptile s : 2 4 > 42

Write and determine the truth value of the following compound propositions: (1)
:p _ :q; (2) r _ :s.

Solution
1 :p _ :q : The sun does not rise in the east or 2 3 > 32
Since “the sun does not rise in the east ” is false and 2 3 > 32 is false,
then :p _ :q is false.
2 r _ :s : Cat is a reptile or 24 42
Since “cat is a reptile” is false and 24 42 is true, then r _ :s is true.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 22 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

p q is read p xor q:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

p q is read p xor q:

p q is true (T) precisely when p and q have di¤erent truth value.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

p q is read p xor q:

p q is true (T) precisely when p and q have di¤erent truth value.

Truth table for exclusive disjunction of two propositions:

p q p q
T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

p q is read p xor q:

p q is true (T) precisely when p and q have di¤erent truth value.

Truth table for exclusive disjunction of two propositions:

p q p q
T T F
T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

p q is read p xor q:

p q is true (T) precisely when p and q have di¤erent truth value.

Truth table for exclusive disjunction of two propositions:

p q p q
T T F
T F T
F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

p q is read p xor q:

p q is true (T) precisely when p and q have di¤erent truth value.

Truth table for exclusive disjunction of two propositions:

p q p q
T T F
T F T
F T T
F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Exclusive Disjunction (XOR)

Exclusive Disjunction (Exclusive-OR – XOR)


Let p and q be propositions. Then p q is also a proposition which is called the
exclusive disjunction (exclusive or, xor ) of p and q.

p q is read p xor q:

p q is true (T) precisely when p and q have di¤erent truth value.

Truth table for exclusive disjunction of two propositions:

p q p q
T T F
T F T
F T T
F F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 23 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q : “Alex likes cookies but he doesn’t like pizza, or Alex doesn’t like
cookies but he likes pizza”;

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q : “Alex likes cookies but he doesn’t like pizza, or Alex doesn’t like
cookies but he likes pizza”; or we can also write “Alex likes either cookies or
pizza, but not both”.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q : “Alex likes cookies but he doesn’t like pizza, or Alex doesn’t like
cookies but he likes pizza”; or we can also write “Alex likes either cookies or
pizza, but not both”.
2 r s:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q : “Alex likes cookies but he doesn’t like pizza, or Alex doesn’t like
cookies but he likes pizza”; or we can also write “Alex likes either cookies or
pizza, but not both”.
2 r s : “2 is an even number but it is not a prime number, or 2 is not an even
number but it is a prime number”;

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q : “Alex likes cookies but he doesn’t like pizza, or Alex doesn’t like
cookies but he likes pizza”; or we can also write “Alex likes either cookies or
pizza, but not both”.
2 r s : “2 is an even number but it is not a prime number, or 2 is not an even
number but it is a prime number”; or we can also write “2 is either an even
number or a prime number, but not both”. The truth of each of r and s

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45


Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q : “Alex likes cookies but he doesn’t like pizza, or Alex doesn’t like
cookies but he likes pizza”; or we can also write “Alex likes either cookies or
pizza, but not both”.
2 r s : “2 is an even number but it is not a prime number, or 2 is not an even
number but it is a prime number”; or we can also write “2 is either an even
number or a prime number, but not both”. The truth of each of r and s is
true, therefore the truth of r s is
MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45
Logical Operators and Compound Propositions

Example of Exclusive Disjunctions

Exercise
Suppose we have following atomic propositions:

p : Alex likes cookies q : Alex likes pizza


r : 2 is an even number s : 2 is a prime number

Write the compound proposition: (1) p q; (2) r s and also determine the
truth value of r s.
Solution:
1 p q : “Alex likes cookies but he doesn’t like pizza, or Alex doesn’t like
cookies but he likes pizza”; or we can also write “Alex likes either cookies or
pizza, but not both”.
2 r s : “2 is an even number but it is not a prime number, or 2 is not an even
number but it is a prime number”; or we can also write “2 is either an even
number or a prime number, but not both”. The truth of each of r and s is
true, therefore the truth of r s is false.
MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 24 / 45
Logical Operators and Compound Propositions

Implication or Conditional Statement

Implication or Conditional Statement


Let p and q be propositions, then p ! q is also a proposition which is called an
implication or a conditional statement of the proposition “if p, then q”. In an
implication p ! q, p is called the hypothesis/ antecedent/ premise and q is called
the conclusion/ consequence.

p ! q is read:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 25 / 45


Logical Operators and Compound Propositions

Implication or Conditional Statement

Implication or Conditional Statement


Let p and q be propositions, then p ! q is also a proposition which is called an
implication or a conditional statement of the proposition “if p, then q”. In an
implication p ! q, p is called the hypothesis/ antecedent/ premise and q is called
the conclusion/ consequence.

p ! q is read:

if p then q q if p

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 25 / 45


Logical Operators and Compound Propositions

Implication or Conditional Statement

Implication or Conditional Statement


Let p and q be propositions, then p ! q is also a proposition which is called an
implication or a conditional statement of the proposition “if p, then q”. In an
implication p ! q, p is called the hypothesis/ antecedent/ premise and q is called
the conclusion/ consequence.

p ! q is read:

if p then q q if p
p implies q q is implied by p

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 25 / 45


Logical Operators and Compound Propositions

Implication or Conditional Statement

Implication or Conditional Statement


Let p and q be propositions, then p ! q is also a proposition which is called an
implication or a conditional statement of the proposition “if p, then q”. In an
implication p ! q, p is called the hypothesis/ antecedent/ premise and q is called
the conclusion/ consequence.

p ! q is read:

if p then q q if p
p implies q q is implied by p
p is su¢ cient for q q is necessary for p

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 25 / 45


Logical Operators and Compound Propositions

p ! q is false (F) if p is true but q is false, otherwise p ! q is true

Truth table for conditional statement p ! q

p q p!q
T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 26 / 45


Logical Operators and Compound Propositions

p ! q is false (F) if p is true but q is false, otherwise p ! q is true

Truth table for conditional statement p ! q

p q p!q
T T T
T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 26 / 45


Logical Operators and Compound Propositions

p ! q is false (F) if p is true but q is false, otherwise p ! q is true

Truth table for conditional statement p ! q

p q p!q
T T T
T F F
F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 26 / 45


Logical Operators and Compound Propositions

p ! q is false (F) if p is true but q is false, otherwise p ! q is true

Truth table for conditional statement p ! q

p q p!q
T T T
T F F
F T T
F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 26 / 45


Logical Operators and Compound Propositions

p ! q is false (F) if p is true but q is false, otherwise p ! q is true

Truth table for conditional statement p ! q

p q p!q
T T T
T F F
F T T
F F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 26 / 45


Logical Operators and Compound Propositions

Examples of Conditional Statements

Example
Consider following propositions:
p : “Alex’s …nal exam is 100”
q : “Alex’s …nal grade is A”
p ! q:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 27 / 45


Logical Operators and Compound Propositions

Examples of Conditional Statements

Example
Consider following propositions:
p : “Alex’s …nal exam is 100”
q : “Alex’s …nal grade is A”
p ! q: “if Alex’s …nal exam is 100, then

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 27 / 45


Logical Operators and Compound Propositions

Examples of Conditional Statements

Example
Consider following propositions:
p : “Alex’s …nal exam is 100”
q : “Alex’s …nal grade is A”
p ! q: “if Alex’s …nal exam is 100, then his …nal grade is A”
p ! q is false (F) when

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 27 / 45


Logical Operators and Compound Propositions

Examples of Conditional Statements

Example
Consider following propositions:
p : “Alex’s …nal exam is 100”
q : “Alex’s …nal grade is A”
p ! q: “if Alex’s …nal exam is 100, then his …nal grade is A”
p ! q is false (F) when Alex’s …nal exam is 100,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 27 / 45


Logical Operators and Compound Propositions

Examples of Conditional Statements

Example
Consider following propositions:
p : “Alex’s …nal exam is 100”
q : “Alex’s …nal grade is A”
p ! q: “if Alex’s …nal exam is 100, then his …nal grade is A”
p ! q is false (F) when Alex’s …nal exam is 100, but his …nal grade is not A”
p ! q is true (T) when:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 27 / 45


Logical Operators and Compound Propositions

Examples of Conditional Statements

Example
Consider following propositions:
p : “Alex’s …nal exam is 100”
q : “Alex’s …nal grade is A”
p ! q: “if Alex’s …nal exam is 100, then his …nal grade is A”
p ! q is false (F) when Alex’s …nal exam is 100, but his …nal grade is not A”
p ! q is true (T) when:
Alex’s …nal exam is not 100

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 27 / 45


Logical Operators and Compound Propositions

Examples of Conditional Statements

Example
Consider following propositions:
p : “Alex’s …nal exam is 100”
q : “Alex’s …nal grade is A”
p ! q: “if Alex’s …nal exam is 100, then his …nal grade is A”
p ! q is false (F) when Alex’s …nal exam is 100, but his …nal grade is not A”
p ! q is true (T) when:
Alex’s …nal exam is not 100
Alex’s …nal grade is A.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 27 / 45


Logical Operators and Compound Propositions

Exercise
At the beginning of a season, an owner of a basketball club once said, “If my club
win this season’s …nal, then I will sell this club”. When the season ended, the club
was relegated to the lower division, yet the owner still sold his club. Does the act
of selling the club violate the owner’s previous statement?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 28 / 45


Logical Operators and Compound Propositions

Contrapositive, Converse, and Inverse

Let p ! q be an implication, then:


the contrapositive (sometimes called contraposition) of p ! q is :q ! :p
the converse of p ! q is q ! p
the inverse of p ! q is :p ! :q

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 29 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T T T T
Observe that the truth of p ! q is identical to the truth of

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T T T T
Observe that the truth of p ! q is identical to the truth of :q ! :p, the truth of
q ! p is identical to the truth of

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T T T T
Observe that the truth of p ! q is identical to the truth of :q ! :p, the truth of
q ! p is identical to the truth of :p ! :q. In this condition, we say

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T T T T
Observe that the truth of p ! q is identical to the truth of :q ! :p, the truth of
q ! p is identical to the truth of :p ! :q. In this condition, we say p ! q is
equivalent to :q ! :p and

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

The truth table for contrapositive, converse, and inverse of an implication:

contrapositive converse inverse


p :p q :q p!q :q ! :p q!p :p ! :q
T F T F T T T T
T F F T F F T T
F T T F T T F F
F T F T T T T T
Observe that the truth of p ! q is identical to the truth of :q ! :p, the truth of
q ! p is identical to the truth of :p ! :q. In this condition, we say p ! q is
equivalent to :q ! :p and q ! p is equivalent to :p ! :q.

Remark
Every conditional statement is equivalent to its contrapositive.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 30 / 45


Logical Operators and Compound Propositions

Bi-implication or Biconditional Statement

Bi-implication
Let p and q be propositions, then p $ q is also a proposition which is called a
bi-implication or a biconditional statement of the propositions “p if and only if q”.

p $ q is read:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 31 / 45


Logical Operators and Compound Propositions

Bi-implication or Biconditional Statement

Bi-implication
Let p and q be propositions, then p $ q is also a proposition which is called a
bi-implication or a biconditional statement of the propositions “p if and only if q”.

p $ q is read:

p if and only if q p i¤ q, (i¤ is a shorthand for if and only if)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 31 / 45


Logical Operators and Compound Propositions

Bi-implication or Biconditional Statement

Bi-implication
Let p and q be propositions, then p $ q is also a proposition which is called a
bi-implication or a biconditional statement of the propositions “p if and only if q”.

p $ q is read:

p if and only if q p i¤ q, (i¤ is a shorthand for if and only if)


if p then q, and conversely p is necessary and su¢ cient for q

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 31 / 45


Logical Operators and Compound Propositions

Bi-implication or Biconditional Statement

Bi-implication
Let p and q be propositions, then p $ q is also a proposition which is called a
bi-implication or a biconditional statement of the propositions “p if and only if q”.

p $ q is read:

p if and only if q p i¤ q, (i¤ is a shorthand for if and only if)


if p then q, and conversely p is necessary and su¢ cient for q
p is equivalent to q p and q are equivalent

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 31 / 45


Logical Operators and Compound Propositions

p $ q is true (T) precisely when p and q have the same truth values, and is
false otherwise.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 32 / 45


Logical Operators and Compound Propositions

p $ q is true (T) precisely when p and q have the same truth values, and is
false otherwise.

p $ q is true (T) precisely when p ! q and q ! p are both true (T).

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 32 / 45


Logical Operators and Compound Propositions

p $ q is true (T) precisely when p and q have the same truth values, and is
false otherwise.

p $ q is true (T) precisely when p ! q and q ! p are both true (T).

Truth table for a biconditional statement:


p q p$q
T T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 32 / 45


Logical Operators and Compound Propositions

p $ q is true (T) precisely when p and q have the same truth values, and is
false otherwise.

p $ q is true (T) precisely when p ! q and q ! p are both true (T).

Truth table for a biconditional statement:


p q p$q
T T T
T F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 32 / 45


Logical Operators and Compound Propositions

p $ q is true (T) precisely when p and q have the same truth values, and is
false otherwise.

p $ q is true (T) precisely when p ! q and q ! p are both true (T).

Truth table for a biconditional statement:


p q p$q
T T T
T F F
F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 32 / 45


Logical Operators and Compound Propositions

p $ q is true (T) precisely when p and q have the same truth values, and is
false otherwise.

p $ q is true (T) precisely when p ! q and q ! p are both true (T).

Truth table for a biconditional statement:


p q p$q
T T T
T F F
F T F
F F

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 32 / 45


Logical Operators and Compound Propositions

p $ q is true (T) precisely when p and q have the same truth values, and is
false otherwise.

p $ q is true (T) precisely when p ! q and q ! p are both true (T).

Truth table for a biconditional statement:


p q p$q
T T T
T F F
F T F
F F T

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 32 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p$q:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p$q

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50 and he didn’t pass the class.
p $ q is false (F) when

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50 and he didn’t pass the class.
p $ q is false (F) when
1 Alex’s …nal grade

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50 and he didn’t pass the class.
p $ q is false (F) when
1 Alex’s …nal grade was not less than 50,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50 and he didn’t pass the class.
p $ q is false (F) when
1 Alex’s …nal grade was not less than 50, but he didn’t pass the class; or

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50 and he didn’t pass the class.
p $ q is false (F) when
1 Alex’s …nal grade was not less than 50, but he didn’t pass the class; or
2 Alex’s …nal grade

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50 and he didn’t pass the class.
p $ q is false (F) when
1 Alex’s …nal grade was not less than 50, but he didn’t pass the class; or
2 Alex’s …nal grade was less than 50,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Logical Operators and Compound Propositions

Example of Biconditional Statement

Example
Consider following propositions:
p : “Alex’s …nal grade was not less than 50”
q : “Alex passed the class”
p $ q : “Alex’s …nal grade was not less than 50 if and only if he passed the class”
p $ q is true (T) when
1 Alex’s …nal grade was not less than 50 and he passed the class; or
2 Alex’s …nal grade was less than 50 and he didn’t pass the class.
p $ q is false (F) when
1 Alex’s …nal grade was not less than 50, but he didn’t pass the class; or
2 Alex’s …nal grade was less than 50, but he passed the class.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 33 / 45


Precedences of Logical Operators

Contents

1 Motivation

2 Proposition: De…nition

3 Proposition: Example

4 Logical Operators and Compound Propositions

5 Precedences of Logical Operators

6 Propositional Formulas (Supplementary)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 34 / 45


Precedences of Logical Operators

Precedence of Logical Operators

From high school arithmetic, we know that 2 + 3 4=

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 35 / 45


Precedences of Logical Operators

Precedence of Logical Operators

From high school arithmetic, we know that 2 + 3 4 = 14,

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 35 / 45


Precedences of Logical Operators

Precedence of Logical Operators

From high school arithmetic, we know that 2 + 3 4 = 14, this is because the
precedence (the processing order) of operator is higher than operator +. We
also learned to use parentheses to specify the processing order of arithmetical
operators.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 35 / 45


Precedences of Logical Operators

Precedence of Logical Operators

From high school arithmetic, we know that 2 + 3 4 = 14, this is because the
precedence (the processing order) of operator is higher than operator +. We
also learned to use parentheses to specify the processing order of arithmetical
operators. For example, 2 + 3 4 means 2 + (3 4) = 14, whereas
(2 + 3) 4 = 20. By knowing the precedence of logical operators, we may reduce
the number of parentheses in a compound propositions.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 35 / 45


Precedences of Logical Operators

Precedence of Logical Operators

From high school arithmetic, we know that 2 + 3 4 = 14, this is because the
precedence (the processing order) of operator is higher than operator +. We
also learned to use parentheses to specify the processing order of arithmetical
operators. For example, 2 + 3 4 means 2 + (3 4) = 14, whereas
(2 + 3) 4 = 20. By knowing the precedence of logical operators, we may reduce
the number of parentheses in a compound propositions.

Which one of the following propositions is equivalent to p ^ q ! r?

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 35 / 45


Precedences of Logical Operators

Precedence of Logical Operators

From high school arithmetic, we know that 2 + 3 4 = 14, this is because the
precedence (the processing order) of operator is higher than operator +. We
also learned to use parentheses to specify the processing order of arithmetical
operators. For example, 2 + 3 4 means 2 + (3 4) = 14, whereas
(2 + 3) 4 = 20. By knowing the precedence of logical operators, we may reduce
the number of parentheses in a compound propositions.

Which one of the following propositions is equivalent to p ^ q ! r?


1 p ^ (q ! r)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 35 / 45


Precedences of Logical Operators

Precedence of Logical Operators

From high school arithmetic, we know that 2 + 3 4 = 14, this is because the
precedence (the processing order) of operator is higher than operator +. We
also learned to use parentheses to specify the processing order of arithmetical
operators. For example, 2 + 3 4 means 2 + (3 4) = 14, whereas
(2 + 3) 4 = 20. By knowing the precedence of logical operators, we may reduce
the number of parentheses in a compound propositions.

Which one of the following propositions is equivalent to p ^ q ! r?


1 p ^ (q ! r)
2 (p ^ q) ! r

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 35 / 45


Precedences of Logical Operators

The precedence of logical operators determines which operator has to be operated


…rst (i.e., be applied to an operand)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 36 / 45


Precedences of Logical Operators

The precedence of logical operators determines which operator has to be operated


…rst (i.e., be applied to an operand)

The precedence of logical operators is described by following table:

Operator Precedence
: 1
^ 2
_ 3
4
! 5
$ 6

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 36 / 45


Precedences of Logical Operators

The precedence of logical operators determines which operator has to be operated


…rst (i.e., be applied to an operand)

The precedence of logical operators is described by following table:

Operator Precedence
: 1
^ 2
_ 3
4
! 5
$ 6

As in arithmetic expressions, we use parentheses “(” and “)” to specify or clarify


the order of an operation in a compound proposition.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 36 / 45


Precedences of Logical Operators

Exercise
Put the parentheses to clarify the precedences of logical operators in the following
compound propositions:
1 p_q^r
2 :p _ q
3 p^q !r
4 p ! :q ^ r
5 :p _ q ! r ^ :s
Solution:
1 p _ q ^ r means

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 37 / 45


Precedences of Logical Operators

Exercise
Put the parentheses to clarify the precedences of logical operators in the following
compound propositions:
1 p_q^r
2 :p _ q
3 p^q !r
4 p ! :q ^ r
5 :p _ q ! r ^ :s
Solution:
1 p _ q ^ r means p _ (q ^ r)
2 :p _ q means

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 37 / 45


Precedences of Logical Operators

Exercise
Put the parentheses to clarify the precedences of logical operators in the following
compound propositions:
1 p_q^r
2 :p _ q
3 p^q !r
4 p ! :q ^ r
5 :p _ q ! r ^ :s
Solution:
1 p _ q ^ r means p _ (q ^ r)
2 :p _ q means (:p) _ q
3 p ^ q ! r means

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 37 / 45


Precedences of Logical Operators

Exercise
Put the parentheses to clarify the precedences of logical operators in the following
compound propositions:
1 p_q^r
2 :p _ q
3 p^q !r
4 p ! :q ^ r
5 :p _ q ! r ^ :s
Solution:
1 p _ q ^ r means p _ (q ^ r)
2 :p _ q means (:p) _ q
3 p ^ q ! r means (p ^ q) ! r
4 p ! :q ^ r means

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 37 / 45


Precedences of Logical Operators

Exercise
Put the parentheses to clarify the precedences of logical operators in the following
compound propositions:
1 p_q^r
2 :p _ q
3 p^q !r
4 p ! :q ^ r
5 :p _ q ! r ^ :s
Solution:
1 p _ q ^ r means p _ (q ^ r)
2 :p _ q means (:p) _ q
3 p ^ q ! r means (p ^ q) ! r
4 p ! :q ^ r means p ! ((:q) ^ r)
5 :p _ q ! r ^ :s means

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 37 / 45


Precedences of Logical Operators

Exercise
Put the parentheses to clarify the precedences of logical operators in the following
compound propositions:
1 p_q^r
2 :p _ q
3 p^q !r
4 p ! :q ^ r
5 :p _ q ! r ^ :s
Solution:
1 p _ q ^ r means p _ (q ^ r)
2 :p _ q means (:p) _ q
3 p ^ q ! r means (p ^ q) ! r
4 p ! :q ^ r means p ! ((:q) ^ r)
5 :p _ q ! r ^ :s means ((:p) _ q) ! (r ^ (:s))

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 37 / 45


Propositional Formulas (Supplementary)

Contents

1 Motivation

2 Proposition: De…nition

3 Proposition: Example

4 Logical Operators and Compound Propositions

5 Precedences of Logical Operators

6 Propositional Formulas (Supplementary)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 38 / 45


Propositional Formulas (Supplementary)

Propositional Formulas

Propositional Formulas
A propositional formula may consist of:
1 propositional constant: T (true) or F (false)
2 atomic variables:

p; p1 ; p2 ; : : :
q; q1 ; q2 ; : : :
r; r1 ; r2 ; : : :

3 propositional operators: :; ^; _; ; !; $
and is constructed using following rules:
1 every atomic proposition is a propositional formula
2 if A and B are propositional formulas, then :A, A ^ B, A _ B, A B,
A ! B, A $ B, are all propositional formulas.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 39 / 45


Propositional Formulas (Supplementary)

Example of Propositional Formulas

Example
According to the de…nition of propositional formulas, we infer that
1 p ^ q is a propositional formula
2 pq_ is not a propositional formula
3 :: (:p ! ::r)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 40 / 45


Propositional Formulas (Supplementary)

Example of Propositional Formulas

Example
According to the de…nition of propositional formulas, we infer that
1 p ^ q is a propositional formula
2 pq_ is not a propositional formula
3 :: (:p ! ::r) is a propositional formula that can be rewritten as
: (: (:p ! : (:r)))
4 p^q ! r_s

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 40 / 45


Propositional Formulas (Supplementary)

Example of Propositional Formulas

Example
According to the de…nition of propositional formulas, we infer that
1 p ^ q is a propositional formula
2 pq_ is not a propositional formula
3 :: (:p ! ::r) is a propositional formula that can be rewritten as
: (: (:p ! : (:r)))
4 p^q ! r _ s is not a propositional formula
5 p _ q_ ! r s

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 40 / 45


Propositional Formulas (Supplementary)

Example of Propositional Formulas

Example
According to the de…nition of propositional formulas, we infer that
1 p ^ q is a propositional formula
2 pq_ is not a propositional formula
3 :: (:p ! ::r) is a propositional formula that can be rewritten as
: (: (:p ! : (:r)))
4 p^q ! r _ s is not a propositional formula
5 p _ q_ ! r s is not a propositional formula
6 p p_q !r^s

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 40 / 45


Propositional Formulas (Supplementary)

Example of Propositional Formulas

Example
According to the de…nition of propositional formulas, we infer that
1 p ^ q is a propositional formula
2 pq_ is not a propositional formula
3 :: (:p ! ::r) is a propositional formula that can be rewritten as
: (: (:p ! : (:r)))
4 p^q ! r _ s is not a propositional formula
5 p _ q_ ! r s is not a propositional formula
6 p p _ q ! r ^ s is a propositional formula that can be rewritten as
(p (p _ q)) ! (r ^ s)
7 : (: (: (:p ! q) ! r) ! s)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 40 / 45


Propositional Formulas (Supplementary)

Example of Propositional Formulas

Example
According to the de…nition of propositional formulas, we infer that
1 p ^ q is a propositional formula
2 pq_ is not a propositional formula
3 :: (:p ! ::r) is a propositional formula that can be rewritten as
: (: (:p ! : (:r)))
4 p^q ! r _ s is not a propositional formula
5 p _ q_ ! r s is not a propositional formula
6 p p _ q ! r ^ s is a propositional formula that can be rewritten as
(p (p _ q)) ! (r ^ s)
7 : (: (: (:p ! q) ! r) ! s) is a propositional formula
8 : ((p ! q) : (r s))

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 40 / 45


Propositional Formulas (Supplementary)

Example of Propositional Formulas

Example
According to the de…nition of propositional formulas, we infer that
1 p ^ q is a propositional formula
2 pq_ is not a propositional formula
3 :: (:p ! ::r) is a propositional formula that can be rewritten as
: (: (:p ! : (:r)))
4 p^q ! r _ s is not a propositional formula
5 p _ q_ ! r s is not a propositional formula
6 p p _ q ! r ^ s is a propositional formula that can be rewritten as
(p (p _ q)) ! (r ^ s)
7 : (: (: (:p ! q) ! r) ! s) is a propositional formula
8 : ((p ! q) : (r s)) is not a propositional formula

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 40 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)
(p ^ q) ! (r _ s), (2)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)
(p ^ q) ! (r _ s), (2) p ^ q, (3)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)
(p ^ q) ! (r _ s), (2) p ^ q, (3) r _ s, (4)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)
(p ^ q) ! (r _ s), (2) p ^ q, (3) r _ s, (4) p, (5)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)
(p ^ q) ! (r _ s), (2) p ^ q, (3) r _ s, (4) p, (5) q, (6)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)
(p ^ q) ! (r _ s), (2) p ^ q, (3) r _ s, (4) p, (5) q, (6) r, and (7)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Subformula

Subformula
1 A formula A is a subformula of A itself.
2 If A and B are two propositional formulas used to construct a more complex
propositional formula C, then A and B are proper subformulas of C.
3 Subformula is transitive: if A is a subformula of B and B is a subformula of
C, then A is a subformula of C.

Example
let A be a formula (p ^ q) ! (r _ s), then the subformulas of A are: (1)
(p ^ q) ! (r _ s), (2) p ^ q, (3) r _ s, (4) p, (5) q, (6) r, and (7) s.

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 41 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (p ! q) _ (q ! p)

Solution:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 42 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (p ! q) _ (q ! p)

Solution: subformulas of (p ! q) _ (q ! p) are:


(p ! q) _ (q ! p)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 42 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (p ! q) _ (q ! p)

Solution: subformulas of (p ! q) _ (q ! p) are:


(p ! q) _ (q ! p)
p!q

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 42 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (p ! q) _ (q ! p)

Solution: subformulas of (p ! q) _ (q ! p) are:


(p ! q) _ (q ! p)
p!q
q!p

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 42 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (p ! q) _ (q ! p)

Solution: subformulas of (p ! q) _ (q ! p) are:


(p ! q) _ (q ! p)
p!q
q!p
p

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 42 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (p ! q) _ (q ! p)

Solution: subformulas of (p ! q) _ (q ! p) are:


(p ! q) _ (q ! p)
p!q
q!p
p
q

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 42 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution:

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)
(p ^ (q _ :r))

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)
(p ^ (q _ :r))
q _ :r

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)
(p ^ (q _ :r))
q _ :r
:p

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)
(p ^ (q _ :r))
q _ :r
:p
:r

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)
(p ^ (q _ :r))
q _ :r
:p
:r
p

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)
(p ^ (q _ :r))
q _ :r
:p
:r
p
q

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Propositional Formulas (Supplementary)

Exercise
List all subformulas of (:p ^ q) ! (p ^ (q _ :r))

Solution: subformulas of (:p ^ q) ! (p ^ (q _ :r)) are:


(:p ^ q) ! (p ^ (q _ :r))
(:p ^ q)
(p ^ (q _ :r))
q _ :r
:p
:r
p
q
r

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 43 / 45


Parse Tree
Parse tree can be used to visualize the structure of a propositional formula.
For instance, the parse tree for (:p ^ q) ! (p ^ (q _ :r)) is
Parse Tree
Parse tree can be used to visualize the structure of a propositional formula.
For instance, the parse tree for (:p ^ q) ! (p ^ (q _ :r)) is
Propositional Formulas (Supplementary)

Exercise
Draw the parse tree of each of these formulas:
1 : (p _ (q ! :p)) ^ r
2 (:p ^ q) ! (p ^ (q _ :r))
3 : ((q ! :p) ^ (p ! r _ q))

MZI (SoC Tel-U) Propositional Logic 1 September-October 2021 45 / 45

You might also like